Hard
Count the Ones
Read a non-negative integer and print how many 1s are in its binary form.
Input
One integer ≥ 0.
Output
A count.
Sample 1
Input
5
Output
2
Sample 2
Input
0
Output
0
Output appears hereOne integer ≥ 0.
A count.
5
2
0
0
Output appears here