#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, m, mx = 1, p;
  cin >> l >> m;
  while (mx <= m) mx *= 10;
  p = mx / 2;
  p = max(p, l);
  p = min(p, m);
  cout << p * (mx - 1 - p) << endl;
}
