#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int start, finish, nines = 1, pointhalf;
  cin >> start >> finish;
  while (nines <= finish) nines *= 10;
  pointhalf = nines / 2;
  pointhalf = max(pointhalf, start);
  pointhalf = min(pointhalf, finish);
  cout << pointhalf * (nines - 1 - pointhalf);
}
