import sys L = int(input()) if L == 2: print("INF") print(0) sys.exit() def F(n): x, y = 1, 0 a, b, c, d = 1, 1, 1, 0 while n > 0: if n % 2 == 1: x, y = a * x + b * y, c * x + d * y a, b, c, d = a * a + b * c, a * b + b * d, c * a + d * c, c * b + d * d n //= 2 return y way = F(L) if L % 2 == 0: way -= F(L // 2) ** 2 print(L) print(way)