fun main(arr: Array<String>) {
    val s = readLine()!!.toMutableList()
    var k = readLine()!!.toLong()
    for(i in s.indices) {
        if(s[i] == 'a') {
            continue
        }
        val toA = ('z' - s[i]) + 1
        if(toA <= k) {
            s[i] = 'a'
            k-=toA
        }
    }
    k %= ('z' - 'a' + 1)
    s[s.lastIndex] = s[s.lastIndex]+k.toInt()
    println(s.joinToString(""))
}
