S = bin(int(input()))[2:] if int(S) % 10 == 0: print(len(S) - 1) else: print(len(S))