n = int(input())
s = 0
while n > 0:
    a = n % 2
    if a == 1:
        s += 1
    n = n // 2
print(s)