Transformation#388

Transformation

1 second
128 megabytes
Very easy

Let's take a positive integer . We will change it as follows: if the number is even, divide it by ; if it is odd, add to it. After several such changes, we will always obtain . For example, starting from , we obtain , then , , , , and finally . Thus, to obtain from , we need to make changes.

Given a positive integer, determine the number of changes required to obtain .

Input

One positive integer (1 \leq n \leq 10^9).

Output

Print the number of changes required to obtain from .

Examples

Example 1

Loading
Loading