#include <bits/stdc++.h>
using namespace std;
inline int len(int n) {
  int k = 0;
  while (n > 0) k++, n /= 10;
  return k;
}
int main() {
  int l, r;
  scanf("%d%d", &l, &r);
  int b = len(r);
  long long m = 9;
  for (int i = 1; i < b; i++) m = m * 10 + 9;
  if (m / 2 >= l && m / 2 <= r)
    printf("%lld\n", m / 2 * (m / 2 + 1));
  else
    printf("%lld\n", max(l * (m - l), r * (m - r)));
  return 0;
}
