import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	char[] s = readln.chomp.to!(char[]);
	long k = readln.chomp.to!long;
	
	foreach(i, c; s){
		int x = 'z' + 1 - c;
		if(s[i] > 'a' && x <= k){
			s[i] = 'a';
			k -= x;
			}
		}
	
	s[$ - 1] = 'a' + (cast(long)(s[$ - 1] - 'a') + k) % 26;
	
	s.writeln;
	
	}