#include <bits/stdc++.h>
int main() {
  int a, b;
  char c[200050] = {};
  scanf("%d%d", &a, &b);
  getchar();
  for (int i = 1; i <= a; i++) c[i] = getchar();
  if (b == 0) {
    for (int i = 1; i <= a; i++) putchar(c[i]);
    putchar('\n');
    return 0;
  }
  if (a == 1) {
    putchar('0');
    putchar('\n');
    return 0;
  }
  putchar('1');
  if (c[1] != '1') b--;
  for (int i = 2; i <= a; i++) {
    if (c[i] != '0' && b > 0) {
      putchar('0');
      b--;
    } else
      putchar(c[i]);
  }
  putchar('\n');
  return 0;
}
