#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  bool fg = 0;
  char ch = getchar();
  while (ch < '0' || '9' < ch) fg |= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return fg ? -x : x;
}
inline long long readll() {
  long long x = 0;
  bool fg = 0;
  char ch = getchar();
  while (ch < '0' || '9' < ch) fg |= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return fg ? -x : x;
}
inline void Out(int x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) Out(x / 10);
  putchar(x % 10 + '0');
}
inline void Outll(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) Outll(x / 10);
  putchar(x % 10 + '0');
}
inline double readdb() {
  double Dec = 0.1, num;
  bool IsN = false, IsD = false;
  char ch = getchar();
  while (ch != '-' && ch != '.' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-')
    IsN = true, num = 0;
  else if (ch == '.')
    IsD = true, num = 0;
  else
    num = ch - '0';
  if (!IsD) {
    while (ch = getchar(), ch >= '0' && ch <= '9') num = num * 10 + ch - '0';
  }
  if (ch == '.') {
    while (ch = getchar(), ch >= '0' && ch <= '9')
      num += Dec * (ch - '0'), Dec *= 0.1;
  }
  return IsN ? -num : num;
}
const int maxn = 1000 + 3;
const long long MOD = 998244353;
int main() {
  long long l = readll(), r = readll();
  long long a = 1, p;
  while (a <= r) a *= 10;
  p = min(max(a / 2, l), r);
  Outll(p * (a - 1 - p)), putchar('\n');
  return 0;
}
