Олимпиадный тренинг

Задача 38317. euphonious word


Задача

Темы: Цикл for Строки
All letters of the Latin alphabet are divided into vowels and consonants. The vowels are: a, e, i, o, u, y. The remaining letters are consonants.

A word is called euphonious if this word does not contain more than two consonants in a row and no more than two vowels in a row. For example, the words abba, mama, program — harmonious, and the words aaa, school, search — dissonant.

The word is entered. If this word is dissonant, then it is allowed to add any letters to any place in this word. Determine the minimum number of letters that can be added to this word to make it euphonious.

Input
A word is entered, consisting only of small Latin letters. The word length does not exceed 30 characters.

Imprint
Print the minimum number of letters that need to be added to this word to make it euphonious.
 
Examples
# Input Output Explanation
1 program 0 The word is already euphonious.
2 school 1 It is enough to add one vowel, for example, between the letters s   and c