题目描述
Problem Description
To adapt to the intense university life, Xiao Z decides to strengthen his English skills.
Having a fondness for mathematics, Xiao Z first reviews cardinal numbers. After spending a whole day, he finally understands all the knowledge about cardinal numbers. Excitedly, Xiao Z decides to test Xiao G, who has passed the CET-4 and is known as the English emperor. The test is simple: Xiao Z provides the English spelling of an integer \( x \), and Xiao G is required to write \( x \) in Arabic numerals.
Xiao Z ensures the following:
-
\(-999,999,999 \leq x \leq 999,999,999\)
-
The English words used in the problem will only include:
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
-
If \( x \) is negative, the first word in the problem will be
negative, otherwise, the wordnegativewill never appear. -
Since Xiao Z is very skilled, he does not write
andin numbers likeone hundred threeinstead ofone hundred and three. Please understand this. -
Except for point 4, the rest follows basic English grammar rules, such as writing
one thousand five hundredinstead offifteen hundredfor 1500.
Upon receiving the problem, Xiao G dismissively says: "Easy problem! Just write a program..."
However, Xiao G is going out to play (probably already enjoying himself far away), so this task is handed over to you.
Input Format
A single line, the English spelling of \( x \) as described in the problem.
Output Format
A single line, the Arabic numeral representation of \( x \).
Sample Input and Output
Sample Input #1
six
Sample Output #1
6
Sample Input #2
negative seven hundred twenty nine
Sample Output #2
-729
Sample Input #3
one million one hundred one
Sample Output #3
1000101
Sample Input #4
eight hundred fourteen thousand twenty two
Sample Output #4
814022
Notes
For \(100\%\) of the data, \(-999,999,999 ≤ x ≤ 999,999,999\).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分