n = int(input()) res = n.bit_length() print(res - 1 if n & -n == n else res)