import Data.Char

main :: IO ()
main = do
  s <- map (subtract (ord 'a').ord) <$> getLine
  k <- readLn
  putStrLn $ map (chr . (+(ord 'a'))) $ calc s k

m :: Int -> Int
m = (`mod`26)

calc :: [Int] -> Int -> [Int]
calc [x] i = [m $ x+i]
calc (x:xs) i = if x == 0 then x:calc xs i else if x + i >= 26 then 0 : calc xs (i-(26-x)) else x:calc xs i