#include <bits/stdc++.h>
using namespace std;
int solve(int x, int y) {
  int current[3] = {x, x, x};
  int min_count = 1;
  int count = 1;
  current[0] = y;
  while (1) {
    if (current[1] != y) {
      current[1] = current[2] - current[0] + 1;
      ++count;
      if (current[1] < y) current[1] = y;
    }
    if (current[2] != y) {
      current[2] = current[1] - current[0] + 1;
      ++count;
      if (current[2] < y) current[2] = y;
    }
    if (current[1] == y && current[2] == y) break;
    sort(current, current + 3);
  }
  min_count = count;
  count = 1;
  current[2] = y + y - 1;
  current[0] = current[1] = y;
  while (1) {
    if (current[0] != x) {
      current[0] = current[1] + current[2] - 1;
      ++count;
      if (current[0] > x) current[0] = x;
    }
    if (current[1] != x) {
      current[1] = current[0] + current[2] - 1;
      ++count;
      if (current[1] > x) current[1] = x;
    }
    if (current[0] == x && current[1] == x) break;
    sort(current, current + 3);
  }
  if (current[2] < x) count++;
  min_count = min(count, min_count);
  return min_count;
}
int main() {
  int x, y;
  cin >> x >> y;
  cout << solve(x, y);
  return 0;
}
