#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<stack>
#include<map>
#include<iostream>
#include<algorithm>
#define m(a,b) memset(a,b,sizeof(a));
using namespace std;
typedef long long LL;
typedef pair<int,int>PII;
const int inf = 1 << 30;
map<char,int>mp;
map<char,int>::iterator it;
const int maxn = 1e5;
bool ans = true;
int main(){
	string a;
	int k;
	cin >> a >> k;
	for(int i = 0;i<a.size();i++){
		if(k==0) break;
		if('z'-a[i]+1<=k){
			k-='z'-a[i]+1;
			a[i] = 'a';
		}
	}
	a[a.size()-1] = a[a.size()-1]+k;
	cout << a << endl;
	return 0;
}