#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, k;
  bool first = true;
  cin >> n >> k;
  string str;
  cin >> str;
  if (n == 1) {
    if (k > 0)
      cout << 0;
    else
      cout << str;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (first) {
      if (str[i] != '1' && k > 0) {
        cout << 1;
        k--;
      } else {
        cout << str[i];
      }
      first = false;
    } else {
      if (str[i] != '0' && k > 0) {
        cout << 0;
        k--;
      } else
        cout << str[i];
    }
  }
}
