#include <bits/stdc++.h>
int main(void) {
  int apple;
  int apple_pieces;
  scanf("%d", &apple);
  scanf("%d", &apple_pieces);
  int apple_b = apple * 3;
  apple_pieces += apple_b;
  int pie = 0;
  while (apple_pieces > 0) {
    apple_pieces /= 3;
    pie++;
  }
  printf("%d", pie);
  return 0;
}
