N = int(input()) n = len(list(bin(N))[2:]) - 1 print(n if N - 2**n % 2 == 0 else n + 1)