You are given a string S that contains lowercase English letters. In one step, you can choose an index i from S and assign the next letter in the alphabet (′a′→′b′,′b′→′c′,…,′z′→′a′) to Si. Define f(str) as the number of indices i (1≤i<|str|) where stri≠stri+1.
You are given a number K. Now, your task is to determine the minimum number of steps required to perform on the string S to obtain a string S′ such that f(S′)≤K.
Input format
Output format
Print the minimum number of steps.
If you set S1 and S2 to ′c′by doing 3 moves, you obtain S′="cccz" for which f(S′)=1.