program codefestival_2016_qualA_c
    use,intrinsic :: iso_fortran_env
    implicit none
    character(100000):: s
    integer(int32):: k,n,i,cost,nind

    read*, s
    n = len_trim(s)
    read*, k

    do i=1,n
        cost = 1+ichar('z') - ichar(s(i:i))
        if (cost <= k) then
            s(i:i) = 'a'
            k=k-cost
        end if
    end do
    nind = (ichar(s(n:n)) - ichar('a'))
    
    s(n:n) = char(mod(nind+k, 26) + ichar('a'))

    print'(a)', trim(s)
end program codefestival_2016_qualA_c