N = int(input()) i = 1; count = 0 while i<=N/2: i = i*2 count = count+1 if N==i: print(count) elif (N-i)%2==0: print(count+1) else: print(count+2)