n = int(input()) if n == 1: print(0) else: c = 0 if n % 2 != 0: n += 1 c = 1 while n != 1: n //= 2 c += 1 print(c)