Write a program with a recursive function to calculate the sum of bits in a natural number.
Input
The first line contains a natural number N ( N<=10
9 ).
Imprint
Print the sum of the bits.
Examples
# |
Input |
Output |
1 |
16 |
1 |
2 |
7 |
3 |
Запрещенные операторы:for;while;until;__builtin_popcount