N = int(input()) if N.bit_count() == 1: print (N.bit_length()-1) else: print (N.bit_length())