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