#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y;
  scanf("%d %d", &x, &y);
  int tr[3] = {y, y, y};
  int ans = 0;
  while (tr[0] != x || tr[1] != x || tr[2] != x) {
    for (int i = 0; i < 3; i += 1) {
      if (tr[i] == x) continue;
      int nxt = tr[(i + 1) % 3];
      int prv = tr[(i - 1 + 3) % 3];
      int req = min(x, nxt + prv - 1);
      if (req != tr[i]) {
        tr[i] = req;
        ++ans;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
