num=int(input())
temp=0
while num!=0:
    temp=temp+(num%2)
    num=int(num/2)
print(temp)