#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
char s[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  cin >> s;
  if (n == 1 && k >= 1) {
    cout << "0";
    return 0;
  }
  if (k == 0) {
    cout << s;
    return 0;
  }
  int cnt = 0;
  if (s[0] == '1') ++cnt;
  s[0] = '1';
  for (int i = 1; i < min(k + cnt, n); ++i) {
    if (s[i] != '0')
      s[i] = '0';
    else
      ++cnt;
  }
  cout << s;
  return 0;
}
