Codeforces Round 320 (Div. 2) [Bayan Thanks-Round]
A
Raising Bacteria
Codeforces
1000
原题
←B →
翻译中…

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?

翻译中…

Input

翻译中…

The only line containing one integer $*x*$ ($1 ≤ *x* ≤ 10^{9}$).

翻译中…

Output

翻译中…

The only line containing one integer: the answer.

翻译中…

Note

翻译中…

For the first sample, we can add one bacterium in the box in the first day morning and at the third morning there will be $4$ bacteria in the box. Now we put one more resulting $5$ in the box. We added $2$ bacteria in the process so the answer is $2$.

翻译中…

For the second sample, we can put one in the first morning and in the 4-th morning there will be $8$ in the box. So the answer is $1$.

翻译中…

样例

Input #1
5
Output #1
2
InputCopy OutputCopy
Input #2
8
Output #2
1
InputCopy OutputCopy
题目信息
题号
579A
时间限制
1 s
内存限制
256 MB
标签
位运算

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。