#include <bits/stdc++.h>
using namespace std;
int main() {
  int L, R;
  scanf("%d%d", &L, &R);
  int k = 1, x = R;
  while (x / 10) k *= 10, x /= 10;
  L = max(L, k);
  long long u = k * 10LL - 1;
  int mid = k * 5;
  long long ans = L <= mid && mid <= R ? mid * (u - mid)
                  : R < mid            ? R * (u - R)
                                       : L * (u - L);
  printf("%I64d\n", ans);
  return 0;
}
