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