#include <bits/stdc++.h>
using namespace std;
int main() {
  int p, q;
  while (cin >> p >> q) {
    int ans = 0;
    int a, b, c;
    a = b = c = q;
    while (c < p) {
      int newC = b + c - 1;
      a = b;
      b = c;
      c = newC;
      ans++;
    }
    if (a != p) ans++;
    if (b != p) ans++;
    cout << ans << endl;
  }
  return 0;
}
