#include <bits/stdc++.h>
using namespace std;
long long f(int a) {
  int k = 1;
  long long b = 0, c = a;
  while (c != 0) {
    b += (9 - c % 10) * k;
    c = c / 10;
    k *= 10;
  }
  return a * b;
}
int main() {
  int n, m;
  char s1[12], s2[12];
  long long a = 1;
  scanf("%s%s", s1, s2);
  for (int i = 1; i <= strlen(s2); i++) a *= 10;
  a /= 2;
  sscanf(s1, "%d", &n);
  sscanf(s2, "%d", &m);
  if (n <= a && a <= m)
    cout << (long long)a * (a - 1) << endl;
  else if (n > a)
    cout << f(n) << endl;
  else
    cout << f(m) << endl;
  return 0;
}
