s=bin(int(input()))
s1=s[2:]
n=len(s1)
j=0
for i in range(n):
    b=int(s1[i])
    if b==1:
        j=j+1
    else:
         j=j
print(j)