#include <bits/stdc++.h>
using namespace std;
int main() {
  int y, x;
  while (~scanf("%d%d", &y, &x)) {
    int a[5];
    for (int i = 0; i < 3; i++) a[i] = x;
    int ans = 0;
    while (1) {
      int flag = 1;
      for (int i = 0; i < 3; i++)
        if (a[i] < y) flag = 0;
      if (flag) break;
      ans++;
      int minn = 1e6, sum = 0;
      for (int i = 0; i < 3; i++) {
        sum += a[i];
        minn = min(minn, a[i]);
      }
      for (int i = 0; i < 3; i++) {
        if (a[i] == minn) {
          a[i] = min(y, sum - minn - 1);
          break;
        }
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
