Smeech#6672

Smeech

1 second
64 megabytes
Very easy

Professor Octastichs has invented a new programming language, Smeech. An expression in Smeech may be a positive or negative integer, or may be of the form (p\ e_1\ e_2) where is a real number between and (inclusive) and e_1 and e_2 are Smeech expressions. The value represented by a Smeech expression is as follows:

Given a Smeech expression, what is its expected value?

Input

Consists of several Smeech expressions, one per line, followed by a line containing . The final line containing is not processed.

Output

For each expression, output its expected value to two decimal places.

Examples

Example 1

Loading
Loading