#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
struct tri {
  int d[3];
  void init() { sort(d, d + 3); }
} S, T;
int main() {
  int x, y;
  scanf("%d%d", &x, &y);
  if (x > y) swap(x, y);
  S.d[0] = S.d[1] = S.d[2] = x;
  T.d[0] = T.d[1] = T.d[2] = y;
  int cnt = 0;
  while (S.d[0] != y) {
    int& a = S.d[0];
    int sum = S.d[1] + S.d[2];
    a = min(y, sum - 1);
    S.init();
    cnt++;
  }
  printf("%d\n", cnt);
}
