~/algor $ cat problems/nolgacha-qadamlar
Steps to zero
Easy
1000 ms
64 MB
26%
A positive integer $n$ is given. At each step: if the number is even, it is divided by two; if it is odd, $1$ is subtracted from it. How many steps are needed until the number becomes $0$?
Input
One positive integer $n$.
Output
One integer — the number of steps.
Note
$1 \le n \le 10^{18}$
Examples
Input #1
14
Output #1
6
Input #2
1
Output #2
1