extension String {
    var asciiValue: UInt32 {
        guard let first = characters.first where characters.count == 1 else  { return 0 }
        return first.unicodeScalarsValue!
    }
    func asciiValueAt(pos pos: UInt32) -> UInt32 {
        guard characters.count > 0 && Int(pos) < characters.count else  { return 0 }
        return Array(characters)[Int(pos)].unicodeScalarsValue!
    }
}
extension Character {
    var unicodeScalarsValue: UInt32? {
        return String(self).unicodeScalars.first?.value
    }
}

var ss = Array(readLine()!.characters)
var K = Int(readLine()!)!

for i in 0 ..< ss.count {
    let number = Int(ss[i].unicodeScalarsValue!)
    if number == 97 {
        continue
    }
    let to = 123 - number
    if to <= K {
        K -= to
        ss[i] = Character("a")
    }
}

if K == 0 {
    print(String(ss))
} else {
    let last = ss.count - 1
    let unicodeScalar = UnicodeScalar((Int(ss[last].unicodeScalarsValue!) + K - 97) % 26 + 97)
    ss[last] = Character(unicodeScalar)
    print(String(ss))
}
