# -*- coding: utf-8 -*- N = int(input()) number = 0 i = 0 while 2**(i+1) < N: i += 1 if (N-2**i) == 1: i += 1 elif (N - 2**i)%2 == 1: i += 2 else: i += 1 print(i)