#include<bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf = (int)1e9;
const double INF = 1e12, EPS = 1e-9;

int main(){
	int n, d;
	string s, t;
	cin >> n >> s >> d;
	t = s;
	rep(i, n) if(s[i] == '0' && d) t[i] = '1', d--;
	for(int i = n - 1; i >= 0; i--) if(s[i] == '1' && t[i] == '1' && d) t[i] = '0', d--;
	cout << t << endl;
	
	return 0;
}