Print the number of bits set to 1 in the binary representation of N

# Input

N# Output

The number of bits set to 1 in the binary representation of N (N < 32)# Sample

Input | Output |
---|---|

3 | 2 |

print sum([x == '1' for x in bin(int(raw_input()))])

Print the number of bits set to 1 in the binary representation of N # Input

N # Output

The number of bits set to 1 in the binary representation of N (N < 32) # Sample

Input | Output |
---|---|

3 | 2 |

print sum([x == '1' for x in bin(int(raw_input()))])