import std.algorithm;
import std.array;
import std.ascii;
import std.bigint;
import std.complex;
import std.container;
import std.conv;
import std.functional;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

auto readInts() {
	return array(map!(to!int)(readln().strip().split()));
}
auto readInt() {
	return readInts()[0];
}
auto readLongs() {
	return array(map!(to!long)(readln().strip().split()));
}
auto readLong() {
	return readLongs()[0];
}

void readlnTo(T...)(ref T t) {
    auto s = readln().split();
    assert(s.length == t.length);
    foreach(ref ti; t) {
        ti = s[0].to!(typeof(ti));
        s = s[1..$];
    }
}

const real eps = 1e-10;

void main(){
    auto s = readln().chomp().to!(char[]);
    auto k = readLong();
    int next(int n) {
        while(n < s.length && s[n] == 'a') {
            ++n;
        }
        return n;
    }
    int i = next(0);
    while(k >= 26) {
        if(i < s.length) {
            k -= 'z'-s[i] + 1;
            s[i] = 'a';
            i = next(i);
        } else {
            k %= 26;
        }
    }
    while(k > 0) {
        if(i < s.length) {
            if(k >= 'z'-s[i]+1) {
                k -= 'z'-s[i]+1;
                s[i] = 'a';
            }
            i = next(i+1);
        } else {
            s[$-1] += k;
            k = 0;
        }
    }
    writeln(s.to!string);
}

