#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tmp[11] = {0,      9,       99,       999,       9999,      99999,
                       999999, 9999999, 99999999, 999999999, 9999999999};
  long long l, r, mm, nn;
  int pos;
  while (scanf("%I64d%I64d", &l, &r) != EOF) {
    pos = log10(r) + 1;
    mm = tmp[pos];
    nn = mm / 2;
    if (nn >= l && nn <= r) {
      printf("%I64d\n", nn * (mm - nn));
    } else {
      if (nn < l) {
        printf("%I64d\n", l * (mm - l));
      } else {
        printf("%I64d\n", r * (mm - r));
      }
    }
  }
  return 0;
}
