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