Time Limit: 1 s
Memory Limit: 128 MB

Submission：5
AC：5
Score：99.68

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

- An integer represents itself
- With probability
*p*,`(`represents*p**e*_{1}*e*)_{2}*x+y*where*x*is the value of*e*and_{1}*y*is the value of*e*; otherwise it represents_{2}*x-y*.

Given a Smeech expression, what is its expected value?

Input consists of several Smeech expressions, one per line, followed by a line containing (). For each expression, output its expected value to two decimal places.

Please Input Input Here

Please Input Output Here

input

7
(.5 3 9)
()

output

7.00
3.00