#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, p = 1;
  cin >> a >> b;
  for (c = b; c > 0; c /= 10) p *= 10;
  if (p / 2 <= b && p / 2 >= a)
    c = p / 2;
  else if (b < p / 2)
    c = b;
  else
    c = a;
  cout << c * (p - 1 - c);
  return 0;
}
