You are to write a program which will work out the value of a piece of text. It is to do this by counting the number of letters in each word in the text.
The text is a list of words, separated by at least one spaces, possibly together with some punctuation and/or line breaks. The length of each word corresponds to a digit in the "value", with a word of length 10 corresponding to the digit 0. There is to be a decimal point after the first digit.
For example the phrase "How I need a monkey" has words of length 3, 1, 4, 1 and 6 respectively. This is worth 3.1416 (coincidentally this is pi to 4 decimal places).
You are to write a program which, given such a message, returns its value.
You may assume that there are between two and sixty words in the message, and that no word is longer than ten letters. You may also assume that the input will all be on one line of text, and each word will have at least one letter.
| Sample Input | Sample Output |
|---|---|
| But a time I spent wandering in bloomy night yon towers | 3.1415926536 |
| By fleeing a dinosaur in Slovakia, a dinosaur in Slovakia made escape! | 2.71828182846 |
| S. Wordsworth | 1.0 |