n = bin(int(input()))
res = 0
for i in str(n):
    if i == '1':
        res += 1
    
print(res)