a = fromEnum 'a'
z = fromEnum 'z'
f k [x] = [a+(x-a+k)`mod`(z-a+1)]
f k (x:xs) 
  | x/=a && l>=0 = a : f l xs
  | otherwise = x : f k xs
  where l = k-(z-x+1)
main = do
  s <- getLine
  k <- fmap read getLine
  putStrLn $ map toEnum $ f k $ map fromEnum s