n = int(input()) x = n + 1 if (x & (x - 1)) == 0: print("INF") else: print(4)