{"trustable":false,"sections":[{"title":"题目描述","value":{"format":"MD","content":"\u003cpre\u003e花花经过长时间的研究,终于研发出了能够跃迁的宇宙飞船。现在,他想要前往致远星。假设地球和致远星都在一个坐标轴上,其中地球位于坐标 $n$ ,而致远星位于坐标 $k$ 。而花花的飞船支持以下两种运动方式:\n1. 飞行:在一个时间单位中,能够从坐标 $x$ 移动到 $x-1$ 或 $x+1$ ;\n2. 跃迁:在一个时间单位中,能够直接从 $x$ 跃迁到 $2x$ 。\n\n现在,花花想知道,他需要多长时间才能到达致远星?\u003c/pre\u003e"}},{"title":"输入描述","value":{"format":"MD","content":"\u003cpre\u003e两个值,分别代表 $n$ 和 $k$ 。$(0 ≤ n, k ≤ 100,000)$\u003c/pre\u003e"}},{"title":"输出描述","value":{"format":"MD","content":"\u003cpre\u003e输出花花最少需要的时间。\u003c/pre\u003e\n\u003cb\u003e注意:仅对于此题,输出时每行末尾的多余空格,不影响答案正确性。\u003c/b\u003e\n"}},{"title":"样例输入","value":{"format":"MD","content":"\u003cpre\u003e5 17\u003c/pre\u003e\n"}},{"title":"样例输出","value":{"format":"MD","content":"\u003cpre\u003e4\u003c/pre\u003e"}},{"title":"样例解释","value":{"format":"MD","content":"\u003cpre\u003e花花的行走轨迹为:5-10-9-18-17\u003c/pre\u003e\n"}}]}