SDE Path

Count Set Bits in a Number

Easy

Count Set Bits in a Number

Count the number of 1 bits in the binary representation of an integer.

Input format

A single non-negative integer X (X ≤ 10^12).

Output format

Print the number of 1 bits in the binary representation of X.

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
5
Expected output
2
Example 2
Input
7
Expected output
3