P7541 [COCI 2009/2010 #1] DOBRA

Description

Lea wrote down a word, and then she replaced some letters in the word with underscores `_`. Next, Lea will replace the underscores with other letters. Lea thinks that a word is **pleasant** if it does not contain $3$ or more **consecutive vowels**, does not contain $3$ or more **consecutive consonants**, and contains at least **one** uppercase letter `L`. **Hint**: The vowels are only $\texttt{a,e,i,o,u}$, and all other letters are consonants. Find how many ways Lea can replace the underscores with uppercase letters so that the word is **pleasant**.

Input Format

One line with a string, representing the word Lea wrote. It is guaranteed that the string contains at most $10$ underscores, and consists only of uppercase letters and underscores.

Output Format

One line with one integer, representing the number of ways. **Note:** You need to use a $64$-bit signed integer. Use `long long` in C/C++, and `int64` in Pascal.

Explanation/Hint

#### Constraints For $100\%$ of the testdata, the string length is $\le 100$. #### Explanation The score for this problem follows the original COCI setting, with a full score of $70$. This problem is translated from [**COCI2009-2010 CONTEST #1**](https://hsin.hr/coci/archive/2009_2010/contest1_tasks.pdf) _**T3 DOBRA**_。 Translated by ChatGPT 5