String.prototype.replaceAt=function(index, character) {
    return this.substr(0, index) + character + this.substr(index+character.length);
}

function Main(input) {
  input = input.split("\n");
  string = input[0];
  point = parseInt(input[1]);

  for (var i = 0; i < string.length; i++) {
    if(point == 0){
      break;
    }
    if((27 - (string[i].charCodeAt(0) - 97 + 1)) <= point){
      point -= (27 - (string[i].charCodeAt(0) - 97 + 1));
      string = string.replaceAt(i, "a");
    }

    if (string.length === (i + 1)) {
      if(point == 0){
        break;
      }
      var code = (string[i].charCodeAt(0) + point);

      if((string[i].charCodeAt(0) + point) > 122){
        code += (- 122 + 97);
      }
      var lastLetter = String.fromCharCode(code);
      string = string.replaceAt(i, lastLetter);

    }
  }
  console.log(string);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));