num=int(input())
temp=0
i=0
while num!=0 :
    assert i<=32
    temp=temp+(num%2)
    num=int(num/2)
    i+=1

print(temp)