cswork / OAOpen practice workspace

PaypalOA #1

Similar Password (Singapore)

EasyJudge-ready

Topics (AI-labelled)GreedyStrings

Change a lowercase password one character at a time by incrementing or decrementing a character by one, so that the number of vowels equals the number of consonants; the vowels are a, e, i, o, u.

Input

One line containing a string of lowercase English letters. This site only accepts even lengths 2..100000.

Output

Output the minimum number of single-character increment/decrement operations.

Example 1

Input:

aabb

Output:

0

Example 2

Input:

zzzz

Output:

10

Example 3

Input:

yybb

Output:

2

Editorial

Loading solution…