# Mustafo Mustafokulov
# Bergen County Academies
# Junior Division


my_file = open("jr-sample-input.txt", "r")
for line in my_file:
    line.strip()
    my_list = line.split()  #Creates a lot of strings
    first_num = my_list[0]
    position = -1 * int(my_list[1])
    if 0 <= int(first_num[position]) <= 4:
        zeroes = ""
        for i in range(len(first_num[position: -1])):      #Change the thing
            zeroes += "0"
        new_list = first_num[0:position] + (str(int(first_num[position]) + int(my_list[2]))[-1]) + zeroes
        print(new_list)
    elif 5 <= int(first_num[position]) <= 9:
        zeroes = ""
        for i in range(len(first_num[position: -1])):      #Change the thing
            zeroes += "0"
        new_list = first_num[0: position] + (str(abs(int(first_num[position]) - int(my_list[2])))[0]) + zeroes
        print(new_list)