import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List
import Data.Char (ord, chr, isDigit, isUpper, isLower, digitToInt, intToDigit)

main :: IO ()
main = do
  solve <$> getLine <*> getl toInt >>= putStrLn

solve :: String -> Int -> String
solve ss k = f k ss
  where
    f n [x] = [rot (n `mod` 26) x]
    f n (x:xs)
      | dista x <= n = 'a' : f (n - dista x) xs
      | otherwise = x : f n xs

dista :: Char -> Int
dista c = (ord 'z' - ord c + 1) `mod` 26

rot :: Int -> Char -> Char
rot n c
  | ord c + n > ord 'z' = let m = ord c + n - ord 'z' - 1 in chr (ord 'a' + m)
  | otherwise = chr (ord c + n)

toInt :: String -> Int
toInt = read

getl :: (String -> a) -> IO a
getl f = f <$> getLine
