n=bin(int(input())) nl=list(n)[2:] s=len(nl) try:a=int("".join(nl[1:])) except:s=0 else: if a==0:s-=1 print(s)