#P2108. 学英语

学英语

Description

To adapt to the intense college study life, Xiao Z decided to review and strengthen his English.

Since Xiao Z is fond of math, he started with numerals. Xiao Z spent a whole day and finally understood everything about cardinal numbers. He was very excited and decided to make some problems to quiz Xiao G, who has passed the College English Test Band 4 (CET-4) and is known as an “English master.” The rule is simple: Xiao Z gives the English spelling of an integer xx, and Xiao D is required to write xx in Arabic numerals.

Xiao Z guarantees the following:

  1. 999,999,999x999,999,999-999,999,999 \leq x \leq 999,999,999.
  2. Only the following English words will be used in the problem statement: negative, zero, one, two, three, four, five, six, seven, eight, nine, ten eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty thirty, forty, fifty, sixty, seventy, eighty, ninety, hundred, thousand, million
  3. If xx is negative, the first word in the problem statement is negative; otherwise, the word negative will never appear.
  4. Because Xiao Z is very confident, he does not know that numbers like 103103 should be written as one hundred and three and instead writes one hundred three. That is, the word and never appears in any of Xiao Z’s problems (even though it normally should). Please understand.
  5. Except for point 4, the rest basically follow English grammar; for example, 15001500 is written as one thousand five hundred rather than fifteen hundred.

Upon receiving the problem, Xiao D scoffed: “Trivial! Just write a program...”.

But Xiao D is going out to have fun (by now probably thousands of miles away), so this task is left to you.

Input Format

One line, the English representation of xx as described in the problem statement.

Output Format

One line, the Arabic numeral form of xx.

six
6
negative seven hundred twenty nine
-729
one million one hundred one
1000101
eight hundred fourteen thousand twenty two
814022

Hint

For 100%100\% of the testdata, 999,999,999x999,999,999-999,999,999 ≤ x ≤ 999,999,999.

Translated by ChatGPT 5