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.slice(0, which) + "a" + string.slice(which+1);
      ++which;
    }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.slice(0, which) + lastLetter + string.slice(which+1);
        break;
      } else {
        ++which;
      }
    }
  }
  console.log(string);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));