import Data.Array
alp = array ('a','z') (zip ['a'..'z'] (0:[25,24..1]))
main=do
 s<-getLine;k<-readLn
 putStrLn(f s k)
  where f [c] k = [([c..'z']++['a'..'z'])!!(mod k 26)]
        f (c:s) k = if (alp!c)<=k then ('a':(f s (k-(alp!c)))) else (c:(f s k))