N=int(input()) c=0 while N > 0:c+=N%2;N//=2 print(c)