#include <bits/stdc++.h>
using namespace std;
const int maxN = 1000;
long long l, r;
long long ans = 0;
int log10(int x) {
  int tam = 1;
  while (x != 0) {
    ++tam;
    x /= 10;
  }
  return tam;
}
long long cal(long long x, long long mmin, long long mmax) {
  if (mmin > mmax) return 0;
  long long gtmin = mmin, gtmax = mmax;
  if (gtmax < x / 2) return gtmax * (x - gtmax);
  if (gtmin > x / 2 + 1) return gtmin * (x - gtmin);
  long long ans1 = x / 2;
  long long ans2 = x - ans1;
  return ans1 * ans2;
}
int main() {
  scanf("%I64d %I64d", &l, &r);
  long long tam = 1;
  for (int i = 1; i < 11; i++) {
    long long tl = max(l, tam);
    long long tr = min(r, tam * 10 - 1);
    ans = max(ans, cal(tam * 10 - 1, tl, tr));
    tam *= 10;
  }
  cout << ans;
  return 0;
}
