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