n = gets.to_i
x = gets.chomp
d = gets.to_i

i, c = 0, 0
while i < n && c < d
    if x[i] == "0"
        x[i] = "2"
        c += 1
    end
    i += 1
end
i -= 1
while i > -1 && c < d
    if x[i] == "1"
        x[i] = "0"
        c += 1
    end
    i -= 1
end
puts x.gsub("2", "1")
