#C5192. Evaluate Mathematical Expression

    ID: 48814 Type: Default 1000ms 256MiB

Evaluate Mathematical Expression

Evaluate Mathematical Expression

You are given a mathematical expression as a string that contains non-negative integers, parentheses, and the operators \( + \), \( - \), and \( * \). The expression is guaranteed to be valid. Your task is to compute the result of this expression by correctly evaluating the operator precedence and properly handling parentheses.

For example, for the expression "3+5*2", the correct output is 13 because the multiplication is performed before the addition.

inputFormat

The input consists of a single line containing the mathematical expression. The expression may include spaces between characters.

outputFormat

Output a single integer which is the result of evaluating the expression.

## sample
3+2
5