#include <bits/stdc++.h>
using namespace std;
int main()
{
int l, r;
cin >> l >> r;
int x = 1;
while (x < l)
x *= 10;
if (x <= r)
cout << x << "\n";
else
cout << l << "\n";
return 0;
}