This problem is a programming version of Problem 57 from projecteuler.net
It is possible to show that the square root of two can be expressed as an infinite continued fraction.
By expanding this for the first four iterations, we get:
The next three expansions are , , and , but the eighth expansion, , is the first example where the number of digits in the numerator exceeds the number of digits in the denominator.
Given . In the first expansions, print the iteration numbers where the fractions contain a numerator with more digits than denominator.
Input contains an integer
Print the answer corresponding to the test case.