#include <bits/stdc++.h>
using namespace std;
const long long int no = 3e6 + 5, modulo = 1e9 + 7, inf = 1e18, N = 3e3 + 1;
long long int ar[no], br[no], cr[no];
long long int ans = 0;
void calc(long long int x, long long int y, long long int z, long long int aim,
          long long int t) {
  if (x == aim and y == aim and z == aim) return;
  if (t == 0) {
    if (x == aim) {
      calc(x, y, z, aim, t ^ 1);
      return;
    }
    x = min(y + z - 1, aim);
    ans++;
    calc(x, y, z, aim, t ^ 1);
  } else if (t == 1) {
    if (y == aim) {
      calc(x, y, z, aim, 2);
      return;
    }
    y = min(x + z - 1, aim);
    ans++;
    calc(x, y, z, aim, 2);
  } else {
    if (z == aim) {
      calc(x, y, z, aim, t ^ 2);
      return;
    }
    z = min(x + y - 1, aim);
    ans++;
    calc(x, y, z, aim, t ^ 2);
  }
}
void solve() {
  long long int n = 0, m = 0, a = 0, b = 0, c = 0, d = 0, x = 0, y = 0, z = 0,
                w = 0, k = 0;
  cin >> n >> m;
  calc(m, m, m, n, 0);
  cout << ans;
}
inline void runn() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  for (long long int i = 1; i < t + 1; i++) {
    solve();
  }
}
