# Repo: https://github.com/SergheiMihailov/competitive-prog
# Link to problem: http://codeforces.com/gym/232626/problem/B
# Language: Python 2.7

print len(filter(lambda x: x == '1', list(bin(int(raw_input())))))