#include <bits/stdc++.h>
using namespace std;
long long j, k, l, m, a, b, c[111], d[111], g, f, t, s, h, e;
long long i, n;
map<long long, long long> x, y;
string p[44], q, r;
char w;
int main() {
  cin >> a >> b;
  m = 1;
  n = a;
  k = b;
  while (b > 0) {
    b /= 10;
    m = m * 10;
  }
  m--;
  l = m / 2;
  a = k;
  b = n;
  if (l > a) cout << a * (m - a);
  if (l < b) cout << b * (m - b);
  if (l <= a && l >= b) cout << l * (m - l);
}
