Олимпиадный тренинг

Задача 31838. Sum of bits


Задача

Темы: Рекурсия
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<=109 ).

Imprint
Print the sum of the bits.

Examples
# Input Output
1 16 1
2 7 3

Запрещенные операторы:for;while;until;__builtin_popcount