#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int a[3];
  a[0] = a[1] = a[2] = m;
  int count = 0;
  sort(a, a + 3);
  while (a[0] != n) {
    int si = a[1] + a[2];
    a[0] = (si - 1 > n) ? n : (si - 1);
    count++;
    sort(a, a + 3);
  }
  cout << count << endl;
}
