Memory is now interested in the de-evolution of objects, specifically triangles. He starts with an equilateral triangle of side length x, and he wishes to perform operations to obtain an equilateral triangle of side length y.

In a single second, he can modify the length of a single side of the current triangle such that it remains a non-degenerate triangle (triangle of positive area). At any moment of time, the length of each side should be integer.

What is the minimum number of seconds required for Memory to obtain the equilateral triangle of side length y?

Input

The first and only line contains two integers x and y (3 ≤ y < x ≤ 100 000) — the starting and ending equilateral triangle side lengths respectively.

Output

Print a single integer — the minimum number of seconds required for Memory to obtain the equilateral triangle of side length y if he starts with the equilateral triangle of side length x.

Examples

Input

6 3


Output

4


Input

8 5


Output

3


Input

22 4


Output

6

Note

In the first sample test, Memory starts with an equilateral triangle of side length 6 and wants one of side length 3. Denote a triangle with sides a, b, and c as (a, b, c). Then, Memory can do <image>.

In the second sample test, Memory can do <image>.

In the third sample test, Memory can do: <image>

<image>.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.StringTokenizer;


public class C {

	//IO
	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;
	
	final public static void main( String[] args ) throws IOException {
		f = new BufferedReader( new InputStreamReader( System.in ) );
		out = new PrintWriter( System.out );
		solve();
		f.close();
		out.close();
		System.exit( 0 );
	}
	
	static boolean valid(int a, int b, int c) {
		return (a+b) > c && (b+c) > a && (a+c) > b;
	}
	
	/*
	static int nextA(int b, int c) {
		return Math.max(c + 1 - b, b + 1 - c);
	}
	
	static int nextB(int a, int c) {
		return Math.max(c + 1 - a, a + 1 - c);
	}
	
	static int nextC(int a, int b) {
		return Math.max(a + 1 - b, b + 1 - a);
	}*/
	
	static class State {
		public int a_;
		public int b_;
		public int c_;
		public State(int a, int b, int c) {
			a_ = a;
			b_ = b;
			c_ = c;
		}
	}
	
	static HashMap<State, Integer> cache = new HashMap<State, Integer>();
	static int INF = 999999;
	
	/*
	static int best(State s, int end) {
			System.out.println(s.a_ + " " + s.b_ + " " + s.c_);
		if (s.a_ == end && s.b_ == end && s.c_ == end) {
			return 0;
		}
		if (cache.containsKey(s)) {
			return cache.get(s);
		}
		
		//try reducing first side as much as possible
		int nextA = Math.max(nextA(s.b_, s.c_), end);
		int costFromA = INF;
		if (nextA < s.a_) {
			costFromA = best(new State(nextA, s.b_, s.c_), end);
		}
		
		int nextB = Math.max(nextB(s.a_, s.c_), end);
		int costFromB = INF;
		if (nextB < s.b_) {
			costFromB = best(new State(s.a_, nextB, s.c_), end);
		}
		
		int nextC = Math.max(nextC(s.a_, s.b_), end);
		int costFromC = INF;
		if (nextC < s.c_) {
			costFromC = best(new State(s.a_, s.b_, nextC), end);
		}
		
		int minCost = 1 + Math.min(Math.min(costFromA, costFromB), costFromC);
		cache.put(s, minCost);
		return minCost;
	}*/
	
	final public static void solve() throws IOException {
		int start = nextInt();
		int end = nextInt();
		int a = end;
		int b = end;
		int c = end;
		int time = 0;
		while(a != start || b != start || c != start) {
			int nextA = Math.min(b + c - 1, start);
			int dA = nextA - a;
			int nextB = Math.min(a + c - 1, start);
			int dB = nextB - b;
			int nextC = Math.min(a + b - 1, start);
			int dC = nextC - c;
			
			//System.out.println( a + " " + b + " " + c );
			//System.out.println(dA + " " + dB + " " + dC);
			
			if (dA >= dB && dA >= dC) {
				a += dA;
				++time;
			}
			else if (dB >= dC && dB >= dA) {
				b += dB;
				++time;
			}
			else {
				c += dC;
				++time;
			}
		}
		//System.out.println(a + " " + b + " " + c);
		System.out.println(time);
	}
	
	final public static String nextToken() throws IOException {
		while ( st == null || !st.hasMoreTokens() ) {
			st = new StringTokenizer( f.readLine() );
		}
		return st.nextToken();
	}
	
	final public static int nextInt() throws IOException {
		return Integer.parseInt( nextToken() );
	}
	
	final public static long nextLong() throws IOException {
		return Long.parseLong( nextToken() );
	}
	
	final public static double nextDouble() throws IOException {
		return Double.parseDouble( nextToken() );
	}
	
	final public static boolean nextBoolean() throws IOException {
		return Boolean.parseBoolean( nextToken() );
	}
}
