cnt = 0
n = int(input())
while n != 0:
    cnt += n%2
    n //= 2
print(cnt)