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


public class Main {
    private static char [] pair = new char[128];
    private static char [] C,S;
    private static int [] cnt;
    private static void compress(){
        int m = 0;
        char lst = 0;
        for (int i = 0;i < S.length;i++){
            if (lst != S[i]) m++;
            lst = S[i];
        }
        C = new char[m];
        cnt = new int[m];
        m = 0;
        for (int i = 0;i < S.length;) {
            int j = i;
            while (j < S.length && S[i] == S[j]) j++;
            C[m] = S[i];
            cnt[m] = j - i;
            m++;
            i = j;
        }
    }
    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int x = io.getNextInt(),y = io.getNextInt(),ans = 0;
        int [] A = {y,y,y};

        while (A[0] != x || A[1] != x || A[2] != x) {
            int ch = 0,best = 0;
            for (int c = 0;c < 3;c++){
                int o = (c == 0) ? 1 : 0,t = 3 - o - c;
                int l = Math.abs(A[o] - A[t]),u = A[o] + A[t],v = u - 1;
                if (l < x && x < u) v = x;

                int diff = v - A[c];
                if (diff > best) {
                    best = diff;
                    ch = c;
                }
            }
            int o = (ch == 0) ? 1 : 0,t = 3 - o - ch;
            int l = Math.abs(A[o] - A[t]),u = A[o] + A[t],v = u - 1;
            if (l < x && x < u) v = x;
            A[ch] = v;
            ans++;
//            System.err.println(Arrays.toString(A));
        }
        io.println(ans);
        io.close();
    }
}



class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }
    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}

