#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
using pii = pair<int, int>;
const int MOD = 1e9 + 7, N = 2e3 + 10;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int i = 0;
  if (n == 1) {
    if (k != 0) s[0] = '0';
  } else {
    while (i < n) {
      if (i > 0) {
        if (s[i] != '0') {
          if (k != 0) {
            k--;
            s[i] = '0';
          } else
            break;
        }
        i++;
      } else {
        if (s[i] != '1') {
          if (k != 0) {
            k--;
            s[i] = '1';
          } else
            break;
        }
        i++;
      }
    }
  }
  cout << s;
  return 0;
}
