CF193E Fibonacci Number

Description

John Doe has a list of all Fibonacci numbers modulo $ 10^{13} $ . This list is infinite, it starts with numbers $ 0 $ and $ 1 $ . Each number in the list, apart from the first two, is a sum of previous two modulo $ 10^{13} $ . That is, John's list is made from the Fibonacci numbers' list by replacing each number there by the remainder when divided by $ 10^{13} $ . John got interested in number $ f $ ( $ 0

Input Format

The first line contains the single integer $ f $ ( $ 0

Output Format

Print a single number — the number of the first occurrence of the given number in John's list. If this number doesn't occur in John's list, print -1.