Recently you have been hired by a company that wished to remain unnamed to promote videos on its Itube channel. There are n users subscribed to this channel. The rules of video going viral are complicated: on the one hand, every day, the number of subscribers who have seen the video can double; on the other hand, at most half of all subscribers who haven't seen the video yet will watch it.
To promote a new video you have been assigned a budget of k burles. At the beginning of each day you can spend x burles to make x persons watch the video. Obviously, you are going to pick subscribers who haven't seen it yet. Each day you can choose different value of x, but the total number of burles spent can not exceed k. Formally, on the i-th day the following happens:
. You have already noticed that according to the rules above you will have to pay at least for the first person to see the video and for the last person. Now you wonder what is the minimum number of days required to make all n subscribers to see the video, assuming you can not spend more than k burles?
The only line of the input contains two integers n and k (1 ≤ n ≤ 1018, 2 ≤ k ≤ 100 000) — the number of subscribers to the channel and the amount of money available (in burles).
Print one integer — the minimum number of days required to make all subscribers see the video.
7 4
3
10 2
6
In the first sample, one of the optimal solutions is:
In the second sample, you pay one burle at the beginning of the first day, then the number of subscribers who have seen the video changes as: 2, 4, 7, 8, 9, and then you pay to make the last subsribers see the video.