#include <bits/stdc++.h>
using namespace std;
int x, y;
int a[5], ans;
int main() {
  scanf("%d%d", &x, &y);
  int z = x + y;
  x = min(x, y);
  y = z - x;
  a[1] = a[2] = a[3] = x;
  for (; a[1] != y || a[2] != y || a[3] != y; ++ans) {
    sort(a + 1, a + 3 + 1);
    a[1] = min(a[2] + a[3] - 1, y);
  }
  cout << ans << endl;
  return 0;
}
