#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[4];
int check(int x[], int a) {
  for (int i = 0; i < 3; i++)
    if (x[i] <= a) return false;
  return true;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < 3; i++) x[i] = m;
  sort(x, x + 3);
  int ret = 0;
  while (!check(x, n)) {
    sort(x, x + 3);
    x[0] = x[1] + x[2] - 1;
    ret++;
  }
  cout << ret << endl;
  return 0;
}
