#include <bits/stdc++.h>
using namespace std;
int l, r;
long long a[10];
long long ans;
void chk(long long x) {
  long long tmp = x;
  long long rev = 0;
  int k = 0;
  while (tmp) {
    rev = rev + (a[k++] / 5 * (9 - (tmp % 10)));
    tmp /= 10;
  }
  ans = max(ans, rev * x);
}
int main() {
  scanf("%d%d", &l, &r);
  a[0] = 5;
  for (int i = 1; i < 10; ++i) a[i] = a[i - 1] * 10;
  chk(l);
  chk(r);
  for (int i = 0; i < 10; ++i)
    if (a[i] >= l && a[i] <= r) chk(a[i]);
  printf("%I64d", ans);
  return 0;
}
