#include <bits/stdc++.h>
using namespace std;
vector<long long> peaks = {5,         50,         500,        5000,
                           50000,     500000,     5000000,    50000000,
                           500000000, 5000000000, 50000000000};
long long weight(long long i) {
  long long temp = i;
  vector<long long> n;
  while (i) {
    n.push_back(i % 10);
    i /= 10;
  }
  reverse(n.begin(), n.end());
  long long nm = 0;
  for (long long x : n) {
    nm *= 10;
    nm += (9 - x);
  }
  return nm * temp;
}
int main() {
  long long n;
  long long l, r;
  cin >> l >> r;
  long long ans = 0;
  for (long long p : peaks) {
    if (p < l) {
      ans = max(ans, weight(l));
    } else if (p > r) {
      ans = max(ans, weight(r));
    } else {
      ans = max(ans, weight(p));
    }
  }
  cout << ans << endl;
}
