#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=1e5;
int main(){
	int k; char a[maxn+3];
    gets(a);
    cin>>k;
    int n=strlen(a);
  	for(int i=0;i<n;i++){
		if(k>=(int)'z'-a[i]+1){
			a[i]='a';
			k-=(int)'z'-a[i]+1;
			}
	}
	if(k!=0)a[n-1]+=k;
    puts(a);
}


