# Takoma Park M.S.
# Jr-5
# Contest 1
# Jerry Jing

# IPO
f = open("1jr_testdata.txt", "r")

for line in f:
  integer = []
  dataList = line.split()
  N = dataList[0]
  P = int(dataList[1])
  D = int(dataList[2])
  for char in N:
    integer.append(int(char))
  digitP = integer[-P]
  dataList = []
  if digitP == 0 or digitP == 1 or digitP == 2 or digitP == 3 or digitP == 4:
    theSum = digitP + D
    for char in str(theSum):
      dataList.append(int(char))
    integer[-P] = dataList[-1]
    position = -1
    while position > -P:
      integer[position] = 0
      position = position - 1
  if digitP == 5 or digitP == 6 or digitP == 7 or digitP == 8 or digitP == 9:
    theSum = digitP - D
    if theSum < 0:
      theSum = theSum * -1
    for char in str(theSum):
      dataList.append(int(char))
    integer[-P] = dataList[0]
    position = -1
    while position > -P:
      integer[position] = 0
      position = position - 1
  for char in integer:
    print(str(char), end = "")
  print()