import sys import re kk = re.compile(r"1") a = int(sys.stdin.readline().strip()) print(len(kk.findall(str(bin(a)))))