import math x = int(input()) f = int(math.log(x, 2)) odd = (x-2**f) % 2 print(f + odd if 2**f + odd == x else f + odd + 1)