#include <bits/stdc++.h>
using namespace std;
int main() {
  priority_queue<int> qu;
  int x, y;
  cin >> x >> y;
  int step = 0;
  qu.push(y);
  qu.push(y);
  qu.push(y);
  for (;;) {
    int max1 = qu.top();
    qu.pop();
    int mid1 = qu.top();
    qu.pop();
    int min1 = qu.top();
    qu.pop();
    if (min1 == x && mid1 == x && x == max1) {
      cout << step << endl;
      break;
    }
    if (max1 + mid1 <= x) {
      min1 = max1 + mid1 - 1;
      step++;
    } else {
      min1 = x;
      step++;
    }
    qu.push(min1);
    qu.push(mid1);
    qu.push(max1);
  }
  return 0;
}
