Codona Virus is a type of organism which can change its shape. It can also multiply its size under suitable conditions. Krishna is a biomedical student who researches in codona. He wants codona to grow at a desired size for his experiments and for preparation of vaccine.
So he created conditions such that codona, from second day, its size gets doubed than the previous day i.e, on first day its size is 1, on day 2 size is 2, on day 3 it is 4, on day 4 it is 8 and so on....
He has a special chemical which can grow additional one unit of size than the expected i.e, if the size after doubling is 4, if you use chemical that day it will grow an extra unit i.e, size is 5 after using the chemical. But the chemical should be used only once a day as it is very costly and rare. So your task is to find the minimum number of times krishna should use chemical to grow codona to desired size.
Note:
The initial size of codona in the first day is considered as one. The size of codona in the second day is 2. The third day it is 4 . The fourth day it is 8 and goes on...
Input Format:
You'll be given the desired size of a codona virus to be grown.
Output Format:
Print the minimum number of times chemical should be used to grow it to the desired size.
Sample Input:
6
Sample Output:
2
Explanation:
The first day he won't use any chemical. Size:1
The second day he will use chemical. Size: 3(2+1)
The third day he will use chemical. Size: 7(6+1)