Text Statistics#594

Text Statistics

1 second
64 megabytes
Very easy

Most modern text editors can provide statistical data about the text being edited. One such statistic is the average word length in the text. A word is defined as the longest continuous sequence of alphabetic characters ('a'–'z', 'A'–'Z'). Words are separated by spaces, digits, and punctuation marks. The average word length is the sum of the lengths of all words divided by the number of words.

For example, in the text "This is div2 easy problem", there are words: "This", "is", "div", "easy", and "problem". The sum of the lengths of all words is 4 + 2 + 3 + 4 + 7 = 20, so the average word length is 20 / 5 = 4.

Write a program that calculates the average word length for the given text. If the text contains no words, consider the average word length to be .

Input

The input contains a single line of text of length from to characters, inclusive. The text contains only the characters 'a'–'z', 'A'–'Z', digits '0'–'9', spaces, and the following punctuation marks: ',', '.', '?', '!', '-'. The end of the text is indicated by the character '#'.

Output

The output contains a single number: the average word length. This value should be printed with a precision of decimal places.

Examples

Example 1

Loading
Loading