Boxes
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are two boxes. There are a balls in the first box, and b balls in the second box (0 < a + b < 2147483648). It is possible to move balls from one box to another. From one box into another one should move as many balls as the other box already contains. You have to determine, whether it is possible to move all balls into one box.
Input
Each line contains two integers a and b, delimited by space.
Output
For each test case print in a separate line the number of moves which are required to move all balls into one box, or -1 if it is impossible.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 28%