#https://ncode.syosetu.com/n4830bu/303/ def maine(L): if L <= 2: return 1 L -= 2 a,b,c,d,maine,book = 1,1,1,0,1,1 while L > 0: if L%2 == 1: maine,book = a*maine+b*book, c*maine+d*book a,b,c,d = a**2+b*c, b*(a+d), c*(a+d), b*c+d**2 L //= 2 return maine L = int(input()) if L==2: print(3) print("INF") else: print(L) if L&1 == 1: print(maine(L)) else: print(maine(L) - maine(L//2)**2)