n = int(input())
if n == 1:
    print(0)
else:
    m = n.bit_length() - 1
    remainder = n - (1 << m)
    print(m + (1 if remainder > 0 else 0))