the great mathematician Leonardo Pizan, known under the pseudonym Fibonacci, left us the famous numerical sequence. Each of its elements, starting with the third, is the sum of the previous two.
rn
the Fibonacci sequence is determined as follows:
& Phi; ₀ = 0
& Phi; ₁ = 1
& Phi; ₙ = & Phi; ₙ₋₁ + & PHI; ₙ₋₂ for n & gt; 1
rn
the beginning of the sequence looks like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...
rn
you are given a natural number A. Your task & mdash; Determine whether this number is part of the Fibonacci sequence. If yes, then withdraw its serial number N (index), such that & Phi; n = A. If the number 1 occurs in the sequence, assume that its index is 1. If the number a is not the number of fibonacci, remove -1.
Input format
The one is introduced by the whole non -negative number a (0 & le; a & le; 10 & sup1; ⁸).
Output format
Bring one whole number: serial number N for which & Phi; n = A. If such a number does not exist, derive -1.
Hint
There will be no clue here, decide for yourself!