#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, r;
  cin >> l >> r;
  long long ans = r;
  long long d1 = ceil(log10(r + 1)), d2 = ceil(log10(l + 1));
  long long rem = pow(10, d1) - 1;
  if (r >= rem / 2 && l <= rem / 2) {
    ans = rem / 2;
  } else if (d1 == d2) {
    if (r >= rem / 2) ans = l;
  }
  long long mirr = rem - ans;
  long long mul = mirr * ans;
  cout << mul;
}
