#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y;
  cin >> x >> y;
  int arr[3];
  for (int i = 0; i < 3; ++i) {
    arr[i] = y;
  }
  int cnt = 0;
  int index = 0;
  int max = 0;
  bool out = false;
  while (arr[index] != x) {
    int indexSbl1 = (index - 1);
    int indexSbl2 = (index - 2);
    if (indexSbl1 < 0) indexSbl1 += 3;
    if (indexSbl2 < 0) indexSbl2 += 3;
    arr[index] = arr[indexSbl1] + arr[indexSbl2] - 1;
    if (arr[index] > x) arr[index] = x;
    index = (index + 1) % 3;
    ++cnt;
  }
  cout << cnt << endl;
  return 0;
}
