The Archaeologist's Trouble IV

Time Limit: 1 Second    Memory Limit: 32768 KB

Lazy Genius, a excellent archaeologist, has been depressed for several days. When Mr. Genius explored in a tomb, he found many lines of numbers on the wall. He got closed to the numbers in order to see more clearly. However, he is discouraged to found that the last several digits of each number unable to identify. From the first digits of each number, Mr.Genius guessed that all the numbers were the powers of 2. He wanted to recover all the numbers, but his mathematics is really poor. so he turns to you, a gifted programming student, hoping that you could help him.

You task is to find the minimum power of 2 of which the first several digits are given.

Input

The input contains several test cases.

Each case contains one positive integer N in a line. (N <= 2000000000)

0 terminates the input.

Output

Output an integer m in one line satisfying that the first several digits of 2^m is same to the corresponding N. If no such integer m, output"no power of 2" in one line.

Sample Input

1
10
12
13
0

Sample Output

4
10
7
17
Submit

Source: ZOJ Monthly, February 2004