Loading Similar Posts
You are given a string S of length N. Your task is to determine and print the minimum number of operations required to convert S into a Dream string.
A Dream string consists only of vowels.
In an operation, you select an index i in S and increment S[i] to the next character cyclically. That is, 'a' becomes 'b', 'b' becomes 'c', and so on, and 'z' becomes 'a'.
Note:
Input Format:
The input consists of two lines:
Output Format:
Print one number—the minimum number of operations required to convert string S into a Dream string.