local s = io.read()
local k = io.read("*n")
local n = #s
local t = {}
local sch = string.char
for i = 1, n - 1 do
  local ti = s:sub(i, i):byte() - 97
  if 0 < ti then
    local cost = 26 - ti
    if cost <= k then
      k = k - cost
      ti = 0
    end
  end
  t[i] = sch(ti + 97)
end
local last = (s:sub(n, n):byte() - 97 + k) % 26
t[n] = sch(last + 97)
print(table.concat(t))
