#include <bits/stdc++.h>
using namespace std;
long long pw[30];
int main() {
  long long l, r;
  scanf("%I64d%I64d", &l, &r);
  pw[0] = 1;
  for (int i = 1; i <= 15; ++i) pw[i] = 10 * pw[i - 1];
  long long ans = 0;
  long long p;
  for (int k = 1; k <= 15; ++k) {
    if (r < pw[k - 1]) break;
    long long x = max(l, 5 * pw[k - 1]);
    if (x > r) x = r;
    long long y = min(r, 5 * pw[k - 1] + 1);
    if (y < l) y = l;
    if (x >= l && x <= r && ans < x * (pw[k] - 1 - x)) {
      ans = x * (pw[k] - x - 1), p = x;
    }
    x = y;
    if (x >= l && x <= r && ans < x * (pw[k] - 1 - x)) {
      ans = x * (pw[k] - x - 1), p = x;
    }
  }
  printf("%I64d", ans);
  return 0;
}
