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

  while(point){

    var checker = (27 - (string[which].charCodeAt(0) - 97 + 1));
    if(checker <= point){

      point = point - checker;

      string = string.substr(0, which) + "a" + string.substr(which+1);
      ++which;

      if(point == 0){
        break;
      }

    }else{

      if (string.length === (which + 1)) {
        var code = (string[which].charCodeAt(0) + point);
        if(code > 122){
          code += (- 122 + 97 - 1);
        }
        var lastLetter = String.fromCharCode(code);
        point = 0;
        string = string.substr(0, which) + lastLetter + string.substr(which+1);
        break;
      } else{
        ++which;
      }

    }

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