#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[5], x, y;
  scanf("%d%d", &y, &x);
  for (int i = 1; i <= 3; i++) a[i] = x;
  int cnt = 0;
  while (1) {
    sort(a + 1, a + 4);
    int s1 = a[3] - a[2] + 1, s2 = a[2] + a[3] - 1;
    if (a[1] == y && a[3] == y) break;
    a[1] = min(s2, y);
    cnt++;
  }
  printf("%d\n", cnt);
  return 0;
}
