#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long l, r;
  cin >> l >> r;
  long long temp = r;
  long long num = 1, ans = 1;
  while (temp) {
    temp /= 10;
    num *= 10;
  }
  num--;
  long long left_lim = (num) / 10;
  long long mid = (num + 1) / 2;
  if (r <= mid) {
    ans = (num - r) * r;
  } else {
    if (l <= mid) {
      ans = (num - mid) * (mid);
    } else {
      ans = (num - l) * l;
    }
  }
  cout << ans << "\n";
  return 0;
}
