import sys


for line in sys.stdin:
    num=int(line[:-1])
    binary_string=f'{num:b}'
    print(binary_string.count('1'))