n = int(input()) v = 2 while v <= 10 ** 9: if v == n: print(1) exit() v *= 2 if n % 2 == 0: print(3) else: print(2)