#include <bits/stdc++.h>
using namespace std;
int x, y;
int ans = 1000000000;
int solve(int a, int b, int c) {
  if (c > a) swap(a, c);
  if (b > a) swap(a, b);
  if (c > b) swap(c, b);
  if (a == b && b == c && c == x) return 0;
  return solve(a, b, min(x, a + b - 1)) + 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> x >> y;
  cout << solve(y, y, y) << endl;
}
