#include <bits/stdc++.h>
using namespace std;
void mytimer(string task) {}
int main() {
  long long l, r;
  cin >> l >> r;
  long long ll = 1, rr = 9;
  long long res = 0;
  while (ll <= r) {
    long long t = rr / 2;
    t = max(l, t);
    t = min(r, t);
    res = max(res, t * (rr - t));
    ll *= 10;
    rr = (rr + 1) * 10 - 1;
  }
  cout << res;
  return 0;
}
