import           Control.Monad
import qualified Data.ByteString.Char8       as BS
import           Data.Char
import           Data.Maybe
import qualified Data.Vector.Unboxed         as V
import qualified Data.Vector.Unboxed.Mutable as VM

readInt = fst . fromJust . BS.readInt
getInt = readInt <$> BS.getLine

main = do
  s <- BS.getLine
  k <- getInt

  let n = BS.length s
  v <- VM.new n
  VM.write v 0 'a'

  let solve i j | i == (n-1) = do
                    VM.write v 0 'a'
                    let c = BS.index s i
                        c' = if ord c + j <= ord 'z'
                             then chr $ ord c + j
                             else chr $ (j - (ord 'z' - ord c)) `mod` (ord 'z' - ord 'a' + 1) + ord 'a' - 1
                    VM.write v i c'

                | otherwise = do
                    let c = BS.index s i
                        d = ord 'z'  - ord c + 1
                    if d <= j
                      then do VM.write v i 'a'
                              solve (i+1) (j-d)
                      else do VM.write v i c
                              solve (i+1) j

  solve 0 k

  v' <- V.freeze v
  putStrLn $ V.toList v'