#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, r, t, d = 0, dec = 1, w = 0;
  cin >> l >> r;
  t = r;
  while (t) d++, t /= 10, dec *= 10;
  long long nines = dec - 1, y = 5 * dec / 10;
  w = r * (nines - r);
  if (r / l == 1) w = max(w, l * (nines - l));
  if (y >= l && y <= r) w = max(w, y * (nines - y));
  y--;
  if (y >= l && y <= r) w = max(w, y * (nines - y));
  cout << w << endl;
  return 0;
}
