#include <bits/stdc++.h>
long long floor_pow10(long long num) {
  long long result = 1;
  for (; result * 10 <= num; result *= 10)
    ;
  return result;
}
long long psi(long long num) { return floor_pow10(num) * 10 - num - 1; }
long long f(long long num) { return num * psi(num); }
int main() {
  int l, r;
  std::scanf("%d%d", &l, &r);
  long long m = floor_pow10(r) * 10 / 2;
  std::printf("%lld\n", l <= m && m <= r ? f(m) : std::max(f(l), f(r)));
  return 0;
}
