#include <bits/stdc++.h>
using namespace std;
long long l, r;
long long cal(long long n) {
  long long t = n, x = 1;
  while (t != 0) x *= 10, t /= 10;
  x--;
  return n * (x - n);
}
int main() {
  cin >> l >> r;
  long long res = 0, k = 5;
  res = max(cal(l), cal(r));
  for (int i = 0; i <= 9; i++) {
    if (k >= l && k <= r) res = max(res, cal(k));
    k *= 10;
  }
  cout << res;
  return 0;
}
