#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    int a = m, b = m, c = m, cnt = 0;
    while (true) {
      if (a == n && b == n && c == n) {
        break;
      }
      if (cnt % 3 == 0) {
        c = min(n, a + b - 1);
      } else if (cnt % 3 == 1) {
        a = min(n, b + c - 1);
      } else {
        b = min(n, a + c - 1);
      }
      cnt++;
    }
    printf("%d\n", cnt);
  }
  return 0;
}
