Talking Money

No attempts yetTime limit2sMemory limit256 MB

Problem

A telephone banking system reads account balances out loud to customers. The text to speech engine behind it cannot pronounce numbers, so every amount has to reach it already written out in English words.

Convert one currency value between -$999999999999.99 and $999999999999.99 to words. None of the bank customers are trillionaires just yet.

Both parts of the amount are always written, so a dollar amount of 0 becomes zero dollars and a cent amount of 0 becomes zero cents. The following rules apply.

  • A billions, millions, thousands, or units group whose value is 0 is not written at all.
  • Every number from 21 to 99 that is not a multiple of ten joins its tens word and its units word with a single hyphen, for example twenty-one and ninety-nine.
  • The word and follows the word hundred in every case except a round hundred. Compare one hundred thousand with one hundred and twenty-three thousand.
  • The word and goes between the smallest written group among billions, millions and thousands and the units group when the units group is less than one hundred and is not 0. Compare two thousand and forty-six with two thousand five hundred and fifty-seven.
  • The word dollars follows the dollar amount, except when the dollar amount is exactly 1, where the word is dollar.
  • The word and goes between the dollar amount and the cent amount.
  • The word cents follows the cent amount, except when the cent amount is exactly 1, where the word is cent.
  • A negative value ends with in debit, and a positive value ends with in credit.
  • A value of zero ends with neither in debit nor in credit.

The only spellings needed are 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, billion.

Input

The first line holds the value v, written as a minus sign for a negative value, then $, then the dollar amount with no digit separators, then ., then exactly two digits for the cents.

The dollar amount has no leading zero unless it is 0. The value satisfies -999999999999.99 ≤ v ≤ 999999999999.99, and a value of zero is given as $0.00 with no minus sign.

Output

Print the amount in English words on one line, with a single space between words.