n=int(raw_input()) s=0 while n: s+=n%2 n/=2 print(s)