#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  string S;
  cin >> S;
  K = N - K;
  if (K > 0){
    for (int i = 0; i < N - 2; i++){
      if (S.substr(i, 3) == "010"){
        S[i + 1] = '0';
      }
    }
    S = S.substr(K / 2, N - K / 2 * 2);
  }
  if (K % 2 == 1){
    int M = S.size();
    string T;
    for (int i = 0; i < M - 1; i++){
      if (S.substr(i, 2) == "11"){
        T += '0';
      } else {
        T += '1';
      }
    }
    S = T;
  }
  cout << S << endl;
}