#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
unsigned long long l, r;
unsigned long long ans = 0;
unsigned long long dop(unsigned long long x) {
  unsigned long long y = x, res = 0;
  while (x) {
    x /= 10;
    res = res * 10 + 9;
  }
  return res - y;
}
void upd(unsigned long long x) {
  if (l <= x && x <= r) ans = max(ans, x * dop(x));
}
int main() {
  cin >> l >> r;
  unsigned long long a = 1, b = 9;
  upd(l);
  upd(r);
  while (a <= r) {
    upd(a);
    upd(b);
    upd((a + b) / 2);
    upd((a + b) / 2 + 1);
    upd((a + b) / 2 - 1);
    upd(b / 2 + 1);
    upd(b / 2 - 1);
    upd(b / 2);
    a *= 10;
    b = b * 10 + 9;
  }
  cout << ans << endl;
  return 0;
}
