import Foundation

let str = readLine(stripNewline: true)
var no_oper = Int(readLine(stripNewline: true)!)!

let characterString = str!
var numbers: [Int] = Array<Int>()

for (i, character) in characterString.utf8.enumerate() {
    let stringSegment: String = "\(character)"
    let anInt: Int = Int(stringSegment)! % 97
    
    if anInt != 0 {
        if (26 - anInt) <= no_oper {
            numbers.append(0)
            no_oper -= (26 - anInt)
        } else {
            numbers.append(anInt)
        }
    } else {
        numbers.append(anInt)
    }
}

numbers[numbers.count - 1] = (numbers[numbers.count - 1] + no_oper) % 26

var string = ""
for number in numbers {
    let char = Character(UnicodeScalar(number + 97))
    string.append(char)
}

print(string)