题库练习 Raising Bacteria
← 上一题 下一题 →

A10012 | Raising Bacteria

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

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^{9}$ ).

输出格式

The only line containing one integer: the answer.

输入输出样例

输入 #1
5
输出 #1
2
输入 #2
8
输出 #2
1
C++ 编辑器
输入
输出