N=float(input()) F=0 while N>0: if N%2==1: F+=1 N//=2 print (F)