using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, k) = (c[0], c[1]); var s = ReadLine(); if (n - k == 1) { WriteLine(Up(s)); return; } var n1 = Up(s); var n2 = Up(n1); if ((n - k) % 2 == 0) { WriteLine(string.Concat(n2.Skip((n - k) / 2 - 1).Take(k))); } else { WriteLine(string.Concat(n1.Skip((n - k) / 2).Take(k))); } } static string Up(string s) { var c = new List(); for (var i = 0; i + 1 < s.Length; ++i) c.Add(s[i] == '1' && s[i + 1] == '1' ? '0' : '1'); return string.Concat(c); } }