#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
void f(int array[])
{
int temp;
for (int i = 0; i < 2; i++)
{
for (int j = i; j < 2-i; j++)
{
if (array[j] > array[j+1])
{
temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}
}
}
}
int main()
{
int n, m;
while (scanf("%d %d", &n, &m)>0)
{
int i,j,t, a[3], c = 0;
a[0] = a[1] = a[2] = m;
while (a[0] < n || a[1] < n || a[2] < n)
{
f(a);
if (a[1] + a[2] <= n) a[0] = a[1] + a[2] - 1;
else a[0] = n;
c++;
}
printf("%d\n", c);
}
}
//这样吗
|