from sys import stdin N = int(stdin.readline()) ans = 0 for i in range(4000000): if N >> i & 1: ans += 1 print(ans)