import Control.Monad
import Data.Char

main :: IO ()
main = getLine >>= main'
    where
        main' s = readLn >>= putStrLn . solve s

solve :: String -> Int -> String
solve s@(x : y : zs) k
    | k > 0 && x == 'a' = x : solve (y : zs) k
    | k > 0 && isEnough x k = 'a' : solve (y : zs) (k - ord 'z' + ord x - 1)
    | k > 0 = x : solve (y : zs) k
    | otherwise = s
    where
        isEnough c n = ord 'z' - ord c + 1 <= n
solve (y : _) k
    | k > 0 && m <= ord 'z' - ord y = [chr $ m + ord y]
    | k > 0 = [chr $ ord 'a' + m - ord 'z' + ord y - 1]
    | otherwise = [y]
    where
        m = k `mod` 26
