n = int(input()) print(3-2*(n&n-1==0)-n%2)