#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, P;
  int ans = 0;
  int sum = 0;
  cin >> A >> P;
  int a = (A * 3 + P);
  while (1) {
    if (a == 0) {
      break;
    }
    a = a / 2;
    ans = ans + 1;
  }
  cout << ans << endl;
  return 0;
}
