#include <bits/stdc++.h>
using namespace std;
int a, b, c, n, m, t;
int main() {
  cin >> n >> m;
  a = b = c = m;
  while (1) {
    if (a < n) {
      a = min(c + b - 1, n);
      t++;
    }
    if (b < n) {
      b = min(a + c - 1, n);
      t++;
    }
    if (c < n) {
      c = min(a + b - 1, n);
      t++;
    }
    if (a == b && b == c && c == n) break;
  }
  cout << t;
  return 0;
}
