N = int(input()) binary = bin(N) print(binary.count('1'))