Print the amount of ones in a binary number without using bitwise operators Description

Given a number, print the amount of 1s it has in binary representation.

Input

A number &gt;= 0 in base 10 that won't exceed the highest number your language is able to handle.

Output

The amount of 1s in binary representation.

Winning condition

The shortest code wins.

Disallowed


Bitwise operators. Other operators, like addition and multiplication, are allowed.
Built-in base conversion functions.


Examples

Input:     Ouput:

56432      8


Input:     Output:

45781254   11


Input:     Output:

0          0
APL, 9 12 characters
+/2|⌊⎕÷2*⍳32

This assumes that the interpreter uses 32-bit integers, and that ⎕IO is set to 0 (meaning that monadic ⍳ begins with 0, rather than 1). I used the 32-bit version of Dyalog APL.
Explanation, from right to left:

⍳32 generates a vector of the first 32 integers (as explained before, because ⎕IO is 0, this vector begins with 0).
* is the power function. In this case, it generates 2 to the power of each element of the vector supplied as its right argument.
÷ is the divided-by function. It gives us ⎕ (evaluated user input) divided by each element of the vector to its right (each power of two).
⌊ floors each element of the argument to its right.
2| gives us the remainder of each element of to its right divided by 2.
/ reduces (folds) its right argument using the function to its left, +.

Not quite 9 characters anymore. :(
Old, rule-breaking version:

+/⎕⊤⍨32/2

Explanation, from right to left:

32/2: Replicate 2, 32 times.
⍨ commutes the dyadic function to its left, which in this case is ⊤ (i.e., X⊤⍨Y is equivalent to Y⊤X).
⊤ is the encode function. It encodes the integer to its right in the base given to its left. Note that, because of the commute operator, the right and left arguments are switched. The base is repeated for the number of digits required, hence 32/2.
⎕ is a niladic function that accepts user input and evaluates it.
+/ reduces (folds) its right argument using +. (We add up the 0's and 1's.)