#include<bits/stdc++.h>
using namespace std;
string st;
int n,k;
deque<int> a;
int main()
{
cin>>st>>k;
int t=st.size();
for(int i=0;i<t;i++)
a.push_back(st[i]-'0');
for(int i=1;i<=k;i++)
for(auto it=a.begin();it!=a.end();++it)
if(*it>*(it+1)) {
auto now=it;
a.erase(it);
it=now;
break;
}
while(!a.empty()&&a.front()==0)
a.pop_front();
for(auto& it:a)
cout<<it;
}
https://www.luogu.com.cn/record/108330803