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 $(6,6,6) \rightarrow(6,6,3) \rightarrow(6,4,3) \rightarrow(3,4,3) \rightarrow(3,3,3)$.

In the second sample test, Memory can do $(8,8,8) \rightarrow(8,8,5) \rightarrow(8,5,5) \rightarrow(5,5,5)$.

In the third sample test, Memory can do: $(22,22,22) \rightarrow(7,22,22) \rightarrow(7,22,16) \rightarrow(7,10,16) \rightarrow(7,10,4) \rightarrow$

$(7,4,4) \rightarrow(4,4,4)$.

Difficulty: interview

Starter code:

Solutions:
x, y = list(map(int, input().split()))
x, y = y, x
A = x
B = x
curr = x
count = 0
while curr < y:
	curr = B + A - 1
	A, B = B, curr
	count += 1
count += 2
print(count)


t, f = list(map(int, input().split()))
s = [f] * 3
count = 0
while sum(s) < 3*t:
	s.sort()
	s[0] = min(t, s[1]+s[2] - 1)
	count += 1
print(count)


x, y = list(map(int, input().split()))
if (x > y):
   x, y = y, x
a = x
b = x
c = x
ans = 0
while not (a == b == c == y):
    if (a <= b and a <= c):
        a = min(b + c - 1, y)
    elif (b <= a and b <= c):
        b = min(a + c - 1, y)
    elif (c <= a and c <= b):
        c = min(a + b - 1, y)
    ans += 1
print(ans)


x,y = map(int,input().split())

arr = [y,y,y]
c = 0
t = 0
while True:
    if(arr.count(x)==3):
        break
    if(t==0):
        arr[0] = arr[1]+arr[2]-1
        if(arr[0]>x):
            arr[0] = x
        t = 1
    elif(t==1):
        arr[1] = arr[0]+arr[2]-1
        if(arr[1]>x):
            arr[1] = x
        t = 2
    elif(t==2):
        arr[2] = arr[0]+arr[1]-1
        if(arr[2]>x):
            arr[2] = x
        t = 0
    c += 1
print(c)

x, y = list(map(int, input().split()))
assert y < x

it = 0

a, b, c = y, y, y
while True:
    assert a >= c >= b
    assert a + b > c
    assert a + c > b
    assert b + c > a

    b = a + c - 1

    assert a + b > c
    assert a + c > b
    assert b + c > a

    it += 1
    if b >= x:
        b = x
        break
    a, b, c = b, c, a

b = x
it += 1
assert a + b > c
assert a + c > b
assert b + c > a

c = x
it += 1
assert a + b > c
assert a + c > b
assert b + c > a

print(it)


x, y = [int(x) for x in input().split(' ')]

triset = [y] * 3
c = 0

while sum(triset) < x*3:
    triset.sort()
    triset[0] = triset[2] + triset[1] - 1
    if triset[0] > x: triset[0] = x
    c += 1

print(c)


s = input()
x = int(s.split()[0])
y = int(s.split()[1])
a = [0] * 25
a[0] = y
a[1] = 2 * y - 1
ans = 0
for i in range(2, 25):
    if x <= a[i - 1]:
        ans = i + 1
        break
    a[i] = a[i - 1] + a[i - 2] - 1
print(ans)


3

def transform(a, b, c, y):
    ans = 0
    while True:
        if a == b == c == y:
            return ans
        a, b, c = sorted([a, b, c], reverse=True)
        #print(a, b, c)
        c = min(a + b - 1, y)
        ans += 1
    
x, y = list(map(int, input().split()))
print(transform(y, y, y, x))


x, y = list(map(int, input().split()))
l = [y, y, y]


def arg():
    argmax = 0
    argmin = 0
    for i in range(1, 3):
        if l[i] > l[argmax]:
            argmax = i
        if l[i] < l[argmin]:
            argmin = i
    if argmax == argmin:
        argmax = 0
        argmin = 1
    tmp = [0, 1, 2]
    tmp.remove(argmax)
    tmp.remove(argmin)
    return (argmin, tmp[0], argmax)

cnt = 0
while l[0] != x or l[1] != x or l[2] != x:
    args = arg()
    l[args[0]] = min(x, l[args[2]] + l[args[1]] - 1)
    cnt += 1
print(cnt)


x, y = list(map(int, input().split()))
x, y = min(x, y), max(x, y)
a, b, c = x, x, x
ans = 0
while (not a == b == c == y):
    a = min(b + c - 1, y)
    ans += 1
    if (not a == b == c == y):
        b = min(a + c - 1, y)
        ans += 1
        if (not a == b == c == y):
            c = min(a + b - 1, y)
            ans += 1
        else:
            break
    else:
        break
    
print(ans)

g,a=[int(x) for x in input().split()]
b=c=a
s=0
while min(min(a,b),c)<g:
    s+=1
    l=[a,b,c]
    l.sort()
    a,b,c=l
    a=min(g,c+b-1)
print(s)

def get_next(T):
    [a,b,c] = sorted(T)
    return [b,c,b+c-1]

def main():
    y,x = [int(s) for s in input().split()]
    T = [x,x,x]
    i = 0
    while max(T) < y:
        T = get_next(T)
        i += 1
    print(2+i)

main()


y, x = list(map(int, input(). split()))
a = x; b = x; c = x; k = 0
while a < y or b < y or c < y:
    if a < c+b-1:
        a = c+b-1
        k += 1
        if a >= y and b >= y and c >= y:
            break
    if b < a+c-1:
        b = a+c-1
        k += 1
        if a >= y and b >= y and c >= y:
            break
    if c < a+b-1:
        c = a+b-1
        k += 1
        if a >= y and b >= y and c >= y:
            break
print(k)


x,y = list(map(int,input().split()))
s = [y,y,y]
k = 0
while sum(s)!=x*3:
    mi = min(s)
    ma = max(s)
    sr = sum(s)-ma-mi
    a = sum([sr,ma])-1
    if a>x:
        a = x
    s[s.index(mi)] = a
    k+=1
print(k)


x,y = list(map(int,input().split()))
s = [y,y,y]
k = 0
while sum(s)!=x*3:
    minn = min(s)
    maxx = max(s)
    sr = sum(s)-maxx-minn
    a = sum([sr,maxx])-1
    if a>x:
        a = x
    s[s.index(minn)] = a
    k+=1
print(k)


def exists(a, b, c):
    return a < b + c and b < a + c and c < a + b

x, y = [int(i) for i in input().split()]
a, b, c = y, y, y
count = 0
while a != x or b != x or c != x:
    a, b, c = sorted([a, b, c])
    a = x if exists(x, b, c) else b + c - 1
    count += 1
    
print(count)

x, y = map(int, input().split())
counter = 0

x, y = min(x,y), max(x,y)
x1 = x
x2 = x
x3 = x

while y > x1 or y > x2 or y > x3:
    if x1 != y:
        x1 = min(x3 + x2 - 1, y)
        counter += 1
    if x2 != y:
        x2 = min(x1 + x3 - 1, y)
        counter += 1
    if x3 != y:
        x3 = min(x1 + x2 - 1, y)
        counter += 1

#    print(x1,x2,x3)

print(counter)


          
line1=input().split()
x=int(line1[0])
y=int(line1[1])


a,b,c=y,y,y
steps=0
while (a<x or b<x or c<x):
    a=b+c-1
    steps+=1
    a,b,c=min(a,b,c), a+b+c-max(a,b,c)-min(a,b,c), max(a,b,c)
    
print (steps)


import math

x, y = list(map(int, input().split()))
res = 0
now = [y, y, y]
while min(now) < x:
    res += 1
    ind = now.index(min(now))
    o1, o2 = (ind + 1) % 3, (ind + 2) % 3
    now[ind] = now[o1] + now[o2] - 1
print(res)



c=0
d=0


t=input().split()
x=int(t[0])
y=int(t[1])

xx=[y,y,y]
yy=[x,x,x]
while(yy!=xx):
    xx.sort()
    z=sum(xx[1:3])-1
    c=c+1
    if(z>=x):
        xx[0]=x

    else:
        xx[0]=z

print(c)











#!/usr/bin/env python3.5
import sys

def read_data():
    return list(map(int, next(sys.stdin).split()))


def solve(f, t):
    if f > t:
        f, t = t, f
    if f == t:
        return 0
    a, b, c = f, f, f 
    count = 0
    while a < t:
        c = min(a + b - 1, t)
        c, b, a = sorted((a, b, c))
        count += 1
        #print(a, b, c)
    if b < t:
        #print(t, t, c)
        count += 1
        if c < t:
            #print(t, t, t)
            count += 1
    return count
        


def __starting_point():
    f, t = read_data()
    print(solve(f, t))

__starting_point()

n,m = list(map(int,input().split()))
s = [m,m,m]
ans = 0
while s[0] < n:
    val = min(n,s[1]+s[2]-1)
    s[0] = s[1]
    s[1] = s[2]
    s[2] = val
    ans+=1
print(ans)



def get_next(T):
    [a,b,c] = sorted(T)
    return [b,c,b+c-1]

def __starting_point():
    y,x = [int(a) for a in input().split()]
    T = [x,x,x]
    # print(T)
    i = 0
    while max(T) < y:
        T = get_next(T)
        # print(T)
        i+=1

    print(2+i)
__starting_point()

x, y = map(int,input().split())
a = [y,y,y]
cnt = 0
while True:
    if a[0] == a[1] == a[2] == x:
        break
    if a[1] + a[2] > x:
        a[0] = x
    else:
        a[0] = a[1] + a[2] - 1
    cnt+=1
    a.sort()
print(cnt)

t, f = map(int, input().split())
s = [f] * 3
count = 0
while sum(s) < 3*t:
	s.sort()
	s[0] = min(t, s[1]+s[2] - 1)
	count += 1
print(count)