#include <bits/stdc++.h>
long long get(long long a) {
  long long b = 0;
  while (b < a) {
    b = b * 10 + 9;
  }
  return (b - a) * a;
}
std::vector<long long> a, b;
int main() {
  long long l, r;
  std::cin >> l >> r;
  a.push_back(l);
  a.push_back(r);
  long long q = 1;
  for (int i = 0; i < 12; ++i) {
    a.push_back(q);
    q *= 10;
    a.push_back(q / 2);
    a.push_back(q / 2 - 1);
    a.push_back(q / 2 + 1);
    a.push_back(q / 2 - 2);
  }
  for (int i = l; i < r && i - l < 100; ++i) {
    a.push_back(i);
    a.push_back(r - (i - l));
  }
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] >= l && a[i] <= r) {
      b.push_back(get(a[i]));
    }
  }
  std::sort(b.rbegin(), b.rend());
  std::cout << b[0] << std::endl;
  return 0;
}
