import math n=int(input()) count = math.floor(math.log2(n)) r = n - 2 ** count if r == 0 : pass elif r == 1: count += 1 elif r % 2 ==0: count += 1 else: count += 2 print(count)