#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int x, y;
  while (~scanf("%d%d", &y, &x)) {
    int a[5];
    a[0] = a[1] = a[2] = x;
    int res = 0;
    while (true) {
      if (a[0] == a[1] && a[0] == a[2] && a[0] == y) break;
      sort(a, a + 3);
      a[0] = min(y, a[2] + a[1] - 1);
      res++;
    }
    cout << res << endl;
  }
}
