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(4) else: print(2)