def is_power_of_two(n): return (n & (n - 1)) == 0 and n != 0 n = int(input()) n_plus_1 = n + 1 if is_power_of_two(n_plus_1): print("INF") else: print(4)