#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long l, r;
  cin >> l >> r;
  long long a = 1, b = 9;
  vector<pair<long long, long long> > p;
  while (a <= 1000000000) {
    p.push_back(make_pair(a, b));
    a *= 10LL;
    b = 10LL * b + 9;
  }
  long long res = 0LL;
  for (__typeof((p).begin()) it = (p).begin(); it != (p).end(); ++it) {
    long long x = max(it->first, l), y = min(it->second, r);
    if (x > y) {
      continue;
    }
    for (int d = -2; d <= 2; ++d) {
      long long can = it->second / 2 + d;
      if (can >= x && can <= y) {
        res = max(res, can * (it->second - can));
      }
    }
    res = max(res, x * (it->second - x));
    res = max(res, y * (it->second - y));
  }
  cout << res << endl;
  return 0;
}
