#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y;
  cin >> x >> y;
  int all = 0;
  long long int counter = 0;
  int t[3] = {y, y, y};
  while (all != 3) {
    if (t[0] + t[1] - 1 < x) {
      t[2] = t[0] + t[1] - 1;
      counter++;
    } else if (t[2] != x) {
      t[2] = x;
      counter++;
      all++;
    }
    if (t[0] + t[2] - 1 < x) {
      t[1] = t[0] + t[2] - 1;
      counter++;
    } else if (t[1] != x) {
      t[1] = x;
      counter++;
      all++;
    }
    if (t[1] + t[2] - 1 < x) {
      t[0] = t[1] + t[2] - 1;
      counter++;
    } else if (t[0] != x) {
      t[0] = x;
      counter++;
      all++;
    }
  }
  cout << counter;
  return 0;
}
