s  = bin(int(input()))
count = 0
for i in range(len(s)):
    if s[i] == "1": #切片出来是字符
        count += 1
    else:continue
print(count)