#include <bits/stdc++.h>
using namespace std;
long long res;
void test(long long n, long long q) { res = max(res, n * (q - n)); }
void test(long long n) {
  long long q = 9;
  long long _n = n;
  while (n >= 10) n /= 10, q = 10 * q + 9;
  test(_n, q);
}
int main() {
  int l, r;
  cin >> l >> r;
  res = 0;
  long long q = 9;
  while ((q + 1) / 10 <= r) {
    long long t = (q + 1) / 2;
    if (l <= t && t <= r) test(t, q);
    q = 10 * q + 9;
  }
  test(l);
  test(r);
  cout << res << endl;
}
