n = int(input()) if n % 2 == 1: print(2) exit() for i in range(1, 33): if n == pow(2, i): print(1) exit() print(3)