#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, count = 0;
  int ar[3];
  cin >> x >> y;
  for (int i = 0; i < 3; i++) ar[i] = y;
  while (ar[0] + ar[1] + ar[2] != 3 * x) {
    ar[0] = min(x, ar[1] + ar[2] - 1);
    sort(ar, ar + 3);
    count++;
  }
  cout << count;
  return 0;
}
