```cf
#include<bits/stdc++.h>
using namespace std;
int a[250]={};
string b;
int main()
{
int s;
cin>>b;
cin>>s;
int n=b.size();
for(int i=0;i<=b.size();i++) a[i+1]=b[i]-'0';
for(int i=1;i<=s;i++)
{
for(int j=1;j<=n;j++)
{
if(a[j]>a[j+1])
{
//cout<<a[j]<<" "<<a[j+1]<<" "<<endl;
for(int k=j;k<=n;k++) a[k]=a[k+1];
a[n]=0;
n--;
break;
}
}
}
//cout<<endl;
int l=1;
while (a[l]==0) l++;
for(int i=l;i<=n;i++)
{
cout<<a[i];
}
return 0;
}
//13