import sys input = sys.stdin.readline from collections import deque N,K=map(int,input().split()) S=list(input().strip()) def calc(S): A=["1"]*(len(S)-1) for i in range(len(S)-1): if S[i]=="1" and S[i+1]=="1": A[i]="0" return A for i in range(100): if len(S)>=K+1: S=calc(S) else: break S=deque(S) while len(S)>=K+2: S.popleft() S.pop() S=list(S) if len(S)==K: print("".join(S)) else: S=calc(S) print("".join(S))