#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fastio();
  unsigned long long int a, b;
  cin >> a >> b;
  unsigned long long int r = 0;
  unsigned long long int d = 0;
  string s = to_string(b);
  unsigned long long int c = s.length();
  c = pow(10, c) - 1;
  if (b / 10 > a) a = c / 10;
  d = c - a;
  while (a <= b) {
    r = max(r, d * a);
    if (r == 249999999500000000) break;
    a++;
    d--;
  }
  cout << r << "\n";
}
