import numpy as np def pow(A,n): B = np.array([[1,0],[0,1]]) while n > 0: if n%2==1: B = B.dot(A) A = A.dot(A) n>>=1 return B def fib(L): F = np.array([[1,1],[1,0]]) return pow(F,L-1)[0][0] def calc(L): if L%2==1: return fib(L) else: a = fib(L) b = fib(L//2) return a - b*b L=int(input()) if L == 2: print(3) print("INF") else: print(L) print(calc(L))