def to_bin(k): return bin(k)[2:] def main(): N = int(input()) N_bin = to_bin(N) N_bin_len = len(N_bin) if int(N_bin[1:], 2) == 0: N_bin_len -= 1 print(N_bin_len) main()