#abc188f. [abc188_f]+1-1x2

[abc188_f]+1-1x2

Problem Statement

Takahashi has written an integer XX on a blackboard. He can do the following three kinds of operations any number of times in any order:

  • increase the value written on the blackboard by 11;
  • decrease the value written on the blackboard by 11;
  • multiply the value written on the blackboard by 22.

Find the minimum number of operations required to have YY written on the blackboard.

Constraints

  • 1leXle10181 \\le X \\le 10^{18}
  • 1leYle10181 \\le Y \\le 10^{18}
  • XX and YY are integers.

Input

Input is given from Standard Input in the following format:

XX YY

Output

Print the answer.


Sample Input 1

3 9

Sample Output 1

3

Initially, 33 is written on the blackboard. The following three operations can make it 99:

  • increase the value by 11, which results in 44;
  • multiply the value by 22, which results in 88;
  • increase the value by 11, which results in 99.

Sample Input 2

7 11

Sample Output 2

3

The following procedure can make the value on the blackboard 1111:

  • decrease the value by 11, which results in 66;
  • multiply the value by 22, which results in 1212;
  • decrease the value by 11, which results in 1111.

Sample Input 3

1000000000000000000 1000000000000000000

Sample Output 3

0

If the value initially written on the blackboard equals YY, print 00.