#include <bits/stdc++.h>   using namespace std;   int digit(long long int n) {     if (n > 0) return (digit(n / 10) + 1);     return 0;   }   int main() {     long long int l, h;     long long int a[] = {0,      4,       49,       499,       4999,      49999,                          499999, 4999999, 49999999, 499999999, 4999999999};     long long int b[] = {0,      9,       99,       999,       9999,      99999,                          999999, 9999999, 99999999, 999999999, 9999999999};     cin >> l >> h;     long long int ans = max(a[digit(l)], l);     ans = min(a[digit(h)], h);     ans = max(ans, l);     ans = (long long int)(ans) * (b[digit(ans)] - ans);     cout << ans << endl;     return 0;   }   