Problem list
Log in
#coci00111 · COCI 2009/2010 Contest 1

Dobra

Gold IV 1.0 s 32 MB

Lea runs into a lot of words in her life. A lot of them she finds unpleasant. To compensate for that she started making up pleasant words. Lea makes up new words by writing a nice looking string of characters on a piece of paper. She then erases a few of the most nasty looking characters and replaces them with underscores _. After that she tries to replace the underscores with more acceptable characters trying to form a pleasant word.

Lea considers a word pleasant if it:

  • does not contain $3$ sequential vowels,
  • does not contain $3$ sequential consonants, and
  • contains at least one letter L.

In Croatian, vowels are the letters A, E, I, O, U only. All other letters are consonants.

Input

The first and only line of input contains a string of characters, at most $100$ characters long. The string consists only of uppercase English letters and the character _. There will be at most $10$ characters _.

Output

The first and only line of output should cotain a single integer - the total number of plesant words that can be formed by substituing underscores with uppercase letters of the english alphabet. Warning: Use 64 bit number formats. long long in $C/C$++, int64 in Pascal.

Example 1

Input
L_V
Output
5

Example 2

Input
V__K
Output
10

Example 3

Input
JA_BU_K_A
Output
485
Source
COCI 2009/2010 Contest 1
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 1 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code