(function() {
    'use strict';
    var lines = [];
    require('readline').createInterface({
        input: process.stdin,
        output: process.stdout
    })
        .on('line', function(line) {
            lines.push(line);
        });

    process.stdin.on('end', function() {
        main(lines);
    });
})();
String.prototype.replaceAt=function(index, character) {
    return this.substr(0, index) + character + this.substr(index+character.length);
}
function main(lines) {
    var input = lines[0], numOps = lines[1];
    for (var i=0; i<input.length; i++) {
        var distToA = (123 - input.charCodeAt(i)) % 26;
        if (numOps >= distToA) {
            input = input.replaceAt(i, 'a');
            numOps -= distToA;
        }
        if (numOps === 0) {
            break;
        }
    }
    numOps = numOps % 26;
    input = input.replaceAt(input.length-1, String.fromCharCode(input.charCodeAt(input.length-1) + numOps));
    console.log(input);
}
