n = int(input()) if n == 2: print("INF") elif n == 3 or n == 4: print(6) elif n == 5 or n == 6: print(4) else: print(2)