Question
Count Vowel Islands
You are given a string KaTeX can only parse string typed expression of length KaTeX can only parse string typed expression. A vowel is defined as any of the characters KaTeX can only parse string typed expression (only lowercase).
An island of vowels is a contiguous group of one or more vowels such that the characters immediately before and after the group (if they exist) are consonants.
Your task is to determine the total number of such vowel islands present in the string.
Input
The first line contains a single integer KaTeX can only parse string typed expression — the length of the string.
The second line contains a string KaTeX can only parse string typed expression consisting of KaTeX can only parse string typed expression lowercase English letters.
The second line contains a string KaTeX can only parse string typed expression consisting of KaTeX can only parse string typed expression lowercase English letters.
Output
Print a single integer — the number of vowel islands in the string.
Example
Input
10
baeiocdufa
Output
3
Explanation
Vowels are KaTeX can only parse string typed expression.
The string can be analyzed as follows:
"aeio" → contiguous vowels → 1st vowel island
"u" → single vowel surrounded by consonants → 2nd vowel island
"a" → single vowel at the end → 3rd vowel island
10
baeiocdufa
Output
3
Explanation
Vowels are KaTeX can only parse string typed expression.
The string can be analyzed as follows:
"aeio" → contiguous vowels → 1st vowel island
"u" → single vowel surrounded by consonants → 2nd vowel island
"a" → single vowel at the end → 3rd vowel island