#include <bits/stdc++.h>
using namespace std;
long double l, r;
long double ans = -1;
long double _ten(long double a) {
  long double u = 1;
  while (u <= a) u *= 10;
  return u;
}
void check(long double a) {
  if (l <= a && a <= r) ans = max(ans, a * (_ten(a) - 1 - a));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> l >> r;
  long double ten = 10;
  for (int i = 0; i < 10; i++) {
    check((ten - 1) / 2);
    check(ten / 2);
    ten *= 10;
  }
  check(l);
  check(r);
  cout.setf(ios::fixed);
  cout.precision(0);
  cout << ans;
  return 0;
}
