#include <bits/stdc++.h>
using namespace std;
void scanint(int &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
int main() {
  int a, b, c;
  int p, q;
  scanf("%d%d", &p, &q);
  a = q;
  b = q;
  c = q;
  int ctr = 0;
  if (p == q) {
    printf("0\n");
    return 0;
  }
  do {
    if (b + c - 1 <= p)
      a = b + c - 1;
    else
      a = p;
    swap(a, b);
    swap(b, c);
    ctr++;
  } while (a != b || a != c || a != p);
  printf("%d\n", ctr);
  return 0;
}
