N = int(input()) if N % 2 == 1: print(2) else: N //= 2 while N % 2 == 0: N >>= 1 if N == 1: print(1) else: print(3)