#include <bits/stdc++.h>
using namespace std;
long long best = 0;
int len(long long x) {
  int cnt = 0;
  for (; x; x /= 10) cnt++;
  return cnt;
}
long long nines(int cnt) {
  long long x = 0;
  for (int i = 0; i < cnt; i++) x = x * 10 + 9;
  return x;
}
long long l, r;
void tryw(int x) {
  if (x < l || x > r) return;
  best = max(best, x * (nines(len(x)) - x));
}
int main() {
  cin >> l >> r;
  tryw(l);
  tryw(r);
  for (int i = 1; i <= 10; i++) {
    long long x = nines(i);
    for (int j = -10; j <= 10; j++) tryw(x + j);
    x /= 2;
    for (int j = -10; j <= 10; j++) tryw(x + j);
  }
  cout << best << endl;
  return 0;
}
