11856 - Postfix Expression   

Description

Give a postfix expression, which has 4 operators, ‘+’ , ‘-’, '*' , '/',and positive integers. Print the result.

Notice: testcases don't include parentheses so just follow arithmetic rule.

            And you don't need to consider divide 0 or some tricky rules : )

Input

The input contains exactly 1 sequences of postfix expression. It contains operators, ‘+’  ‘-’ '*' '/',and positive integers separated by a space.

The end of the input is 0.

The length of input sequence is smaller than or equal to 40

 

Output

The output is the result of the expression.

There is a newline symbol in the end

Sample Input  Download

Sample Output  Download

Tags




Discuss