Game
Once upon a time, two mathematicians invented a mathematical game and decided to play it. They asked a third person to write two natural numbers on separate sheets of paper, ensuring that one number was exactly 2 times larger than the other. Each mathematician then took one sheet, without seeing the other's number. They only knew that the number on the other sheet was either 2 times larger or 2 times smaller than theirs. The game began with players taking turns to declare whether they knew the number on their opponent's sheet, continuing until one of them could correctly identify it. Throughout the game, players considered all information from their opponent's responses and always spoke truthfully.
For instance, if the first player received a sheet with the number 1, and the second player received a sheet with the number 2, the game would proceed as follows:
Player 1: I know your number is 2.
In another scenario, the first player might have a sheet with the number 8, and the second player a sheet with the number 16.
Player 1: I don't know the number on your sheet.
Player 2: I don't know the number on your sheet.
Player 1: I don't know the number on your sheet.
Player 2: I don't know the number on your sheet.
Player 1: I know your number is 16.
Your task is to determine on which turn the players will be able to guess the number on their opponent's sheet. If they cannot figure it out, output 0.
Input
The first line of the input file contains two integers a and b, separated by a space, representing the numbers on the sheets of the first and second players, respectively (0 < a, b ≤ 10^6).
Output
Output the turn number on which one of the players can confidently state the number on their opponent's sheet, or 0 if neither player can do so in any number of turns.