import sys
input = sys.stdin.readline

N=int(input())

ANS=["INF","INF","INF",6,6,4,4]

if N<=6:
    print(ANS[N])
else:
    print(2)