n=int(input())
if n<7:
    print(n+1)
else:
    print(1)