Grasshopper and chain
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
One day the grasshopper, as usual, was walking in the meadow. He found the chain. He was interested in one question, what is the minimum jump skill he needs to reach the end of the chain. Note that the chain only consists of uppercase English letters, and the grasshopper can only jump to vowels in the chain.
First, the grasshopper is located to the left of the leftmost symbol in the chain, and its goal is to get to the cell directly to the right of the rightmost symbol. In one jump, the grasshopper can jump any distance from up to its jump skill. Let's look at the picture below for clarity.
The vowel letters are and .
Input
One string , consisting of capital English letters.
Output
Print one number — the minimum jumping ability of a grasshopper.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 2K
Acceptance rate 35%