#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 100, INF = 1e9 + 7, P = 1e9 + 7;
int n, m, cnt, t[5];
int main() {
  cin >> n >> m;
  t[1] = t[2] = t[3] = m;
  while (t[1] != n) {
    cnt++;
    t[1] = min(t[2] + t[3] - 1, n);
    sort(t + 1, t + 4);
  }
  cout << cnt;
}
