VERY IMPORTANT NOTE TO ALL DEC COURSE 2022 PARTICIPANTS (due to delays in email communication): Elementary is gone, so Advanced has a diagnostic test (if you fail, no Dec Course). Syllabus of diagnostic is anything in these prerequisite notes, please review them at this link. Problemsets can be found at this link and under Contests (Collections).

Si the JieJie has too much money. Today, he is feeling rich and carried *$B* as pocket money to school.

As he is too rich, he wants to feel poorer by converting his money into as few notes as possible and needs your help.

In the Jiejie world, notes comes in denomations of powers of 2. (Eg: $1, $2, $4, $8, $16, $32 .. etc)

A single integer, *B*, denoting how much money Si the JieJie brought to school today.

It is guaranteed that *B* will fit into a 64-bit unsigned integer.

A single integer, denoting the minimum number of notes required to express *$B* in notes.

19

3

19 can be expressed as 16 + 2 + 1 for a minimum of 3 notes.

Subtask | Score |
---|---|

1 | 100 |