#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e8 + 5e7;
const int mod = 998244353;
int solve() {
  long long l, r;
  scanf("%lld", &l);
  scanf("%lld", &r);
  long long t = 1, q(0);
  while (t <= r) t *= 10;
  t--;
  if (t / 2 >= l && t / 2 <= r)
    q = t / 2;
  else
    q = t / 2 < l ? l : r;
  return printf("%lld\n", q * (t - q));
}
int main() { solve(); }
