x=int(input()) xbin=format(x,'b') len_xbin=int(len(xbin)) if x&(x-1)==0: print(len_xbin-1) else: print(len_xbin)