You are a lover of bacteria. You want to raise some bacteria in a box. 

Initially, the box is empty. Each morning, you can put any number of bacteria into the box. And each night, every bacterium in the box will split into two bacteria. You hope to see exactly *x* bacteria in the box at some moment. 

What is the minimum number of bacteria you need to put into the box across those days?
The only line containing one integer *x* (1 ≤ *x* ≤ 10<sup class="upper-index">9</sup>).
# finding the amount of ones in the binary representation of the amount of bacteria you want at the end,
# gives you the amount of bacteria you need to add (and on which day)
dec_input = int(input())
bin_input = bin(dec_input)
bin_input_str = str(bin_input)[2:]
gen = [bit for bit in bin_input_str if bit == "1"] # make a list with only the ones from the binary number
count = len(gen) # count how many ones are in the binary number
print(count)