num = int(input())  
b_mun = format(num, "b").count("1")  
print(b_mun)