#include
using namespace std;
int main() {
string a,b;
int m,k=0;
cout<<"a = "; cin>>a;
cout<<"b = "; cin>>b;
int ind=b.length();
if (a.length()==b.length())
while ((a[k]==b[k]) && (k
for (int i=k; i
if (b[i]==48) break;
m=b[i+1]-48;
if (i
if ((b[i]-48)*m < max((b[i]-49),1)*9) {
if ((b[i]-49==0) && (i>0)) continue;
ind=i+1; b[i]--; break;
}
}
for (int i=ind; i
if (b[0]=='0') b.erase(0,1);
cout
system("pause");
return 0;
}