#include <bits/stdc++.h>
using namespace std;
const long long inf = LLONG_MAX / 1000;
int a[200100];
int i, n, m;
int counter = 0;
bool ok(int a, int b, int c) {
  if (a < b + c && b < a + c && c < a + b && max(a, max(b, c)) <= n)
    return true;
  return false;
}
int main() {
  cin >> n >> m;
  for (i = 1; i <= 3; i++) a[i] = m;
  while (true) {
    while (ok(a[1] + 1, a[2], a[3])) {
      a[1]++;
    }
    counter++;
    sort(a + 1, a + 3 + 1);
    if (a[1] == n && a[2] == n && a[3] == n) {
      cout << counter;
      return 0;
    }
  }
  return 0;
}
