The Qingming Festival is coming soon, and the Loser named ydw is a single dog. He feel peculiarly boring, so he wants to play with Loser yybird. Unfortunately, Loser yybird is dating with Goddess loy. Loser ydw is so jealousy that he decides to find them and destroy their dating.
Suppose ydw’s position in coordinate axis is n while yybird’s position is m. (1 ≤ n, m ≤ 10^4), The Loser ydw walks in an unusual way that he has two choices in each step, one is backing to p-1 and the other is going to 2p (p is the current position of ydw).
Then, you are so kind that you will help ydw to calculate the absolute minimum steps he need to take so that he can reach the place where yybird and loy are dating.
Two integers n and m.
The minimum steps.