#include <bits/stdc++.h>
using namespace std;
class TaskC {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int x, y;
    in >> x >> y;
    if (x == y)
      out << 0;
    else {
      int res = 0;
      int arr[3] = {y, y, y};
      while (arr[0] != x or arr[1] != x or arr[2] != x) {
        sort(arr, arr + 3);
        swap(arr[0], arr[2]);
        for (int i = x; i > y; --i) {
          if (i + arr[0] > arr[1] and i + arr[1] > arr[0] and
              arr[0] + arr[1] > i) {
            arr[2] = i;
            break;
          }
        }
        res++;
      }
      out << res;
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  TaskC solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
