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)