N = int(input()) i = 0 while N > 0: i += 1 if 2 ** (i + 1) >= N: break if N == 1: print(0) elif N == 2 ** i: print(i) elif (N - 2 ** i) % 2 == 0: print(i + 1) else: print(i + 1)