#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
const long double pi = acos(-1);
const long long int mod = 1e9 + 7;
bool debug = false;
long long int recursion(long long int n) {
  if (n < 10) return 9 - n;
  return 10 * recursion(n / 10) + 9 - n % 10;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t = 1, n, i, j, k, len, x, y, z, c, f, flag, p, q, mx, mn, l, r,
                sum, ans, tmp, it, pos, avg, m, cnt;
  string s;
  char ch;
  vector<long long int> v;
  vector<pair<long long int, long long int>> vec;
  unordered_map<long long int, long long int> mappu;
  pair<long long int, long long int> pr;
  {
    f = 0;
    sum = 0;
    flag = 0;
    ans = 0;
    cnt = 0;
    v.clear();
    mappu.clear();
    vec.clear();
    cin >> l >> r;
    if (r < 100) {
      for (i = l; i <= r; i++) ans = max(ans, i * recursion(i));
      cout << ans;
      exit(0);
    }
    ans = max(l * recursion(l), r * recursion(r));
    x = 1;
    while (x <= 1e15) {
      tmp = x;
      if (tmp >= l and tmp <= r) {
        ans = max(ans, tmp * recursion(tmp));
      }
      tmp /= 2;
      if (tmp >= l and tmp <= r) {
        ans = max(ans, tmp * recursion(tmp));
      }
      x *= 10;
    }
    cout << ans << "\n";
  }
  return 0;
}
