Postfix#208

Postfix

1 second
64 megabytes
Easy (≈1000)

In postfix notation, the operator is written after the two operands it operates on. For example, the sum of two numbers A and B is written as A B +. The notation B C + D * represents the expression (B + C) * D, and likewise, the notation A B C + D * + represents the expression A + (B + C) * D. In postfix notation, there are no parentheses or operator precedence, meaning the operations are evaluated in the order they appear.

Input

A single line containing a postfix string consisting of the operators +, -, *. The number of numbers and operations in the string does not exceed 100.

Output

Output the final value of the expression. It is guaranteed that the result does not exceed 2^{31} in absolute value.

Examples

Example 1

Loading
Loading