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.*;
import java.util.*;

// this is not good for reading double values.
public class third {
	static long m = 100000007;

	public static void main(String[] args) throws IOException {
		Reader r = new Reader();
		PrintWriter o = new PrintWriter(System.out, false);
		// PrintWriter o = new PrintWriter(new FileOutputStream("file" +
		// ".out"));

		int a = r.nextInt();
		int b = r.nextInt();
		if (a == b)
			o.println(0);
		else if (a / 2 < b) {
			o.println(3);
		} else if (a / 2 == b)
			o.println(4);
		else {

			int b1 = b, b2 = b, b3 = b;
			int count = 0;
			while ((b1 != a) && (b2 != a) && (b3 != a)) {
				int b1b2 = b1 + b2;
				int b2b3 = b2 + b3;
				int b1b3 = b1 + b3;
				if (b1b2 > a)
					b3 = a;
				else if (b2b3 > a)
					b1 = a;
				else if (b1b3 > a)
					b2 = a;
				else {
					int min;
					b1b2 = Math.abs(a - b1b2);
					b2b3 = Math.abs(a - b2b3);
					b1b3 = Math.abs(a - b1b3);
					if (b1b2 >= b2b3)
						min = b2b3;
					else
						min = b1b2;
					if (min >= b1b3)
						min = b1b3;
					else
						min = min;

					if (min == b1b2) {
						b3 = (b1 + b2 - 1);
						if (b3 > a)
							b3 = a;
					} else if (min == b2b3) {
						b1 = b2 + b3 - 1;
						if (b1 > a)
							b1 = a;
					} else if (min == b1b3) {
						b2 = b1 + b3 - 1;
						if (b2 > a)
							b2 = a;
					}
				}
				//o.println(b1 + " " + b2 + " " + b3);

				count++;
				//if ((b1 + b2 <= b3) || (b2 + b3 <= b1) || (b1 + b3 <= b2)) {
				//	o.println("ERROR    " + count);
				//	break;
				//}

			}
			o.println(count + 2);
		}

		o.close();
	}

	
	// input/output
	static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (c == '.')
				while ((c = read()) >= '0' && c <= '9')
					ret += (c - '0') / (div *= 10);
			if (neg)
				return -ret;
			return ret;
		}

		public int[] readIntArray(int size) throws IOException {
			int[] arr = new int[size];
			for (int i = 0; i < size; i++)
				arr[i] = nextInt();
			return arr;
		}

		public long[] readLongArray(int size) throws IOException {
			long[] arr = new long[size];
			for (int i = 0; i < size; i++)
				arr[i] = nextLong();
			return arr;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}
}
