P28239 [洛谷] Learning English
普及
题目描述

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:

  1. \(-999,999,999 \leq x \leq 999,999,999\)

  2. 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

  1. If \( x \) is negative, the first word in the problem will be negative, otherwise, the word negative will never appear.

  2. Since Xiao Z is very skilled, he does not write and in numbers like one hundred three instead of one hundred and three. Please understand this.

  3. Except for point 4, the rest follows basic English grammar rules, such as writing one thousand five hundred instead of fifteen hundred for 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 部分

样例输入
six
样例输出
6