# ref: def fib(n): if n == 0: return (1, 0) a, b = fib(n // 2) aa, bb, abab = a ** 2, b ** 2, (a+b) ** 2 if n % 2 == 0: return (aa + bb, abab - aa) else: return (abab - aa, abab + bb) n = int(input()) if n == 2: print('3\nINF\n') else: if n % 2 == 1: ans = fib(n)[1] else: a, b = fib(n // 2) ans = a * b * 2 print('%d\n%d\n' % (n, ans))