P10473 Expression Evaluation 4.

Description

Given an expression where the operators only include +, -, *, /, ^, find the final value of the expression. The testdata may contain parentheses, and may also contain redundant parentheses. The testdata guarantees that no value will exceed the int range, and the testdata may contain negative numbers.

Input Format

Only one line with a string, which is the expression.

Output Format

Only one line, which is the computed result of the expression.

Explanation/Hint

The total length of the expression does not exceed $30$. Translated by ChatGPT 5