Bit Manipulation
Count how many bits are set to 1 in the binary representation of a non-negative integer (this count is called the Hamming weight).
Input
A single non-negative integer n.
Output
Print the number of 1 bits in n.
Constraints
0 <= n <= 2^32 - 1
Example 1
Input
11
Output
3
11 is 1011 in binary, which has three 1s.