\begin{problem}{Fight Against Numbers}{\textsl{standard input}}{\textsl{standard output}}{1 second}{1024 mebibytes}

Star and Marco got themselves into a world where they are being attacked
by swarms of numbers!
Fortunately, the friends know what to do.

Each number is first served with a shot from Marco's binary blaster
to expose the number's binary notation.
After that, Star performs a power move one or more times:
she reverses the binary notation of the number and then subtracts one.
When the number becomes zero, it shatters to pieces.

The heroes have just entered the fight with a number $n$.
How many power moves would it take to shatter this number to pieces?

Reversing works as follows:
the first digit of the binary notation exchanges places with the last one,
the second with the second-to-last, and so on.
If leading zeroes appear in the result, they are discarded.


\InputFile
The first line contains an integer $n$
($1 \le n \le 10^9$).


\OutputFile
Print a single integer: how many times would Star have to perform
the power move so that the number $n$ becomes zero and shatters to pieces.


\Examples

\def\kwExampleNotes{\textsl{explanation}}

\begin{examplethree}
\exmpfile{example.01}{example.01.a}{%
\input{001.note.txt}}%
\exmpfile{example.02}{example.02.a}{%
\input{002.note.txt}}%
\exmpfile{example.03}{example.03.a}{%
\input{003.note.txt}}%
\end{examplethree}

\end{problem}

