n = int(input()) if n == 1: print(0) exit() if n & 1 : n -= 1 cnt = 1 else : cnt = 0 while n != 0: n, m = divmod(n, 2) cnt += 1 if n == 1 and m == 0: break print(cnt)