What's the number?

0

0 votes
Easy
Problem

Clark and Leah got their happy ending last night. It was a blast! As part of the tradition, the next bride and groom must be chosen. To do this, they gave the eligible bachelors and bachelorretes pieces of paper with texts. Their task is simply to decode a secret number given the following instructions:

  • The first number in the text is always the base number b.
  • If the succeeding number in the text is preceded and succeeded by a vowel, subtract the number from the base number;
  • If the succeeding number in the text is preceded by a consonant and succeeded by a vowel or vice-versa, add the number from the base; or
  • If the succeeding number in the text is preceded and succeeded by a consonant, multiply the base by 2.

For other numbers read that do not follow the rules above, ignore and proceed to the next.

The last bachelor and bachelorrete to guess the number gets to be the next bride and groom.

CONSTRAINT

b0

INPUT

Input has several lines of text.

OUTPUT

Display the secret number.

SAMPLE INPUT

Just 100 smile for me and le20t the day begin 
You are the sunshine that Lights
my he10art with in30 
I'm sure t10hat you're an angel in disguise 
Come take my ha10nd and together we will rise 
On the wings of lov10e
Up and above the clo50uds 
The only way to fly is 
On the wings of love 1000

SAMPLE OUTPUT

190
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?