#include<bits/stdc++.h>
using namespace std;
int a,b,q,k=0;string n;
void choose(int q)
{
if(q<4&&q-b<0)
{
b=b-q-1;
cout<<9;
return;
}
else
{
while(1)
{
if(a<=0||q==9)break;
q++;
a--;
}
cout<<q;
return;
}
}
int main()
{
cin>>n>>a>>b;
while(1)
{
if(n[k]<'0') break;
q=n[k]-'0';
k++;
choose(q);
}
return 0;
}