#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin>>n;
  string str;
  cin>>str;
  int K;
  cin>>K;
  string ans = str;
  
  for(int i=0;i<n;i++){
    if(str[i] == '1' || K == 0) continue;
    ans[i] = '1';
    K--;
  }

  for(int i=0;i<n;i++){
    if(str[n-1-i] != ans[n-1-i] || K == 0)continue;
    ans[n-1-i] = '0';
    K--;
  }
  cout<<ans<<endl;

  return 0;
}