n=int(input()) def func(x): y=0 while 2**y=1: y=func(n) n-=2**y ans+=y print(y)