from sys import stdin N = bin(int(stdin.readline())) print(str(N).count('1'))