num = input().strip() num = int(num) num_of_one = 0 while num > 0: if num%2: num_of_one+=1 num = num//2 print(num_of_one)