Skip to content
C

Count Set Bits

Easyjavapythonccppjavascript

Given a non-negative integer N, count how many 1 bits are present in its binary representation.

Input Format

A single line containing the integer N.

Output Format

Print the number of set bits.

Input (stdin)

Output

Run your code to see output here...