function main() N = parse(BigInt, readline()) L = [BigInt(1), 1] for i in 3:400 push!(L, L[i - 2] + L[i - 1]) end ans = -1 for i in 1:400 if L[i] % N == 0 ans = i break end end println(join(ans, " ")) end main()