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