n = input() m = str(bin(int(n))) cnt = 0 for i in m[2:]: # bin()函数转出来的前缀加了0b cnt = cnt + int(i) print(cnt)