12085 - EECS_2018_MID2-1   

Description

Simulate the process of arithmetics(四則運算) in form of prefix notation and calculate the answer.

The characteristic of prefix notation is that operators always precede their operands rather than between them. For example, we see an equation '1 + 2' in conventional infix notation . In prefix notation the expression becomes '+ 1 2'. Another example is (3 - 6) * 2. In prefix notation it becomes ' * - 3 6 2'.

Input

An equation in prefix notation.

Operands are integers in the range between 0 and 9.

There are four operators in this problem: addition('+'), subtraction('-'), multiplication('*'), and division('/').

At the end of an equation, there is a '=' symbol. 

No blank space between elements.

No calculate errors(for example, 5/0) will happen.

The length of equations (includes '=') is less than 40.

Output

Show the answer of the equation

Note that the answer may be a decimal number, so you are asked to use '%.3f' to show the answer, or you'll get WA even if your answer is correct.

No newline character at the end. 

Sample Input  Download

Sample Output  Download

Tags




Discuss