Module Module1

    Sub Main()
        Dim s As String = Console.ReadLine()
        Dim K As Integer = Val(Console.ReadLine())
        Dim n(Len(s) - 1) As Byte
        For i As Integer = 0 To Len(s) - 1
            n(i) = Asc(Mid(s, i + 1, 1)) - 97
        Next
        Dim rest As Byte
        For i = 0 To Len(s) - 1
            If i < Len(s) - 1 Then
                rest = 25 - n(i)
                If K > rest Then
                    n(i) = 0
                    K -= rest + 1
                End If
            Else
                n(i) = (n(i) + K) Mod 26
            End If
        Next
        For i As Integer = 0 To Len(s) - 1
            Console.Write(Chr(n(i) + 97))
        Next
        Stop
    End Sub

End Module
