/** * @FileName a.cpp * @Author kanpurin * @Created 2022.08.13 06:58:14 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n,k;cin >> n >> k; k = n+1-k; string s;cin >> s; if (k == 1) { cout << s << endl; return 0; } for (int i = 1; i < n-1; i++) { if (s[i-1] == '0' && s[i+1] == '0') { s[i] = '0'; } } if (k % 2 == 1) { for (int i = k/2; i < n-k/2; i++) { cout << s[i]; } cout << endl; } else { string t; for (int i = 0; i < n-1; i++) { if (s[i]=='0'||s[i+1]=='0') t.push_back('1'); else t.push_back('0'); } cout << t.substr((k-1)/2,n+1-k) << endl; } return 0; }