#include <bits/stdc++.h>
using namespace std;
clock_t tp = clock();
long long int power1(long long int x, long long int y) {
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int ncr(long long int n, long long int r) {
  if (n < r) return 0;
  long long int p = 1, k = 1;
  if (n - r < r) r = n - r;
  if (r != 0) {
    while (r) {
      p *= n;
      k *= r;
      long long int g = gcd(p, k);
      p /= g;
      k /= g;
      n--;
      r--;
    }
  } else
    p = 1;
  return p;
}
long long int lcm(long long int a, long long int b) {
  return (a / gcd(a, b) * b);
}
bool compare_incresing(pair<long long int, long long int> l1,
                       pair<long long int, long long int> l2) {
  if (l1.first != l2.first)
    return (l1.first < l2.first);
  else
    return (l1.second < l2.second);
}
long long int n, e[100005][2], par[15], a[100005];
vector<long long int> ed[100005];
long long int parent(long long int n) {
  if (par[n] > 0) return par[n];
  long long int x = 0;
  for (auto it : ed[n]) {
    x = it;
    if (parent(x) != -1) break;
  }
  return par[n] = x;
}
long long int find(long long int n, long long int an) {
  long long int cnt = 0;
  for (auto it : ed[n]) {
    if (it == parent(n)) continue;
    cnt += find(it, an);
  }
  if (an > a[n - 1]) cnt += a[n - 1];
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    int n, k;
    cin >> n >> k;
    string s;
    cin >> s;
    if (k == n && k == 1) {
      cout << 0;
      return 0;
    }
    for (long long int i = 0; i < s.size(); i++) {
      if (k && !i && s[i] != '1')
        cout << 1, k--;
      else if (k && i && s[i] != '0')
        cout << 0, k--;
      else
        cout << s[i];
    }
  }
  return 0;
}
