#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> a = {m, m, m};
  int ans = 0;
  while (true) {
    sort(a.begin(), a.end());
    if (a[0] == n && a[2] == n) break;
    int t1 = a[1] + a[2] - 1;
    if (t1 > n) {
      t1 = n;
    }
    vector<int> b = {a[1], a[2], t1};
    a = b;
    ans += 1;
  }
  cout << ans << '\n';
  return 0;
}
