main = do
    s <- getLine
    k <- readLn
    putStrLn $ solve k s

solve :: Int -> String -> String
solve k (x : []) = (:[]) . toEnum $ a + (((fromEnum x) - a + k) `mod` 26)
    where a = fromEnum 'a'
solve 0 xs = xs
solve k (x:xs) | c <= k = 'a' : solve (k-c) xs
               | otherwise = x : solve k xs 
    where a = fromEnum 'a'
          c = (26 - (fromEnum x - a)) `mod` 26