#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, r;
  long long ans;
  cin >> l >> r;
  long long rr = r, rn = 10;
  while (rr /= 10) rn *= 10;
  long long amin = (rn - 1) / 2;
  if (l > amin) {
    ans = (rn - 1 - l) * l;
  } else if (r < amin) {
    ans = (rn - 1 - r) * r;
  } else {
    ans = (rn - 1 - amin) * amin;
  }
  cout << ans;
  return 0;
}
