s = int(input())
w = list(bin(s))
a = 0
for i in w:
    if i == '1':
        a += 1
print(a)