#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:16000000")
#pragma warning(disable : 4996)
const int inf = 1 << 25;
const double eps = 1e-9;
long long power(long long a, int x) { return x == 0 ? 1 : a * power(a, x - 1); }
long long g(int l, int r, long long a) {
  if (l > r) return -1;
  long long ans = max(l * (a - l), r * (a - r));
  for (long long x = a / 2 - 2; x < a / 2 + 3; ++x) {
    if (x >= l && x <= r) ans = max(ans, x * (a - x));
  }
  return ans;
}
long long f(long long l, long long r) {
  long long ans = 0;
  for (int len = (1); len < (11); ++len) {
    long long a = power(10, len) - 1;
    long long L = power(10, len - 1), R = a;
    ans = max(ans, g(max(L, l), min(R, r), a));
  }
  return ans;
}
int main() {
  int l, r;
  cin >> l >> r;
  cout << f(l, r) << endl;
  return 0;
}
