#C12748. Evaluate Arithmetic Expression

    ID: 42209 Type: Default 1000ms 256MiB

Evaluate Arithmetic Expression

Evaluate Arithmetic Expression

Given a mathematical expression as a string containing non-negative integers and the operators +, -, *, /, evaluate the expression according to the standard operator precedence.

The division operator should be interpreted as truncation toward zero. In other words, for any integers \(a\) and \(b\) (with \(b \neq 0\)), the result of \(\frac{a}{b}\) is defined as \(\text{trunc}(\frac{a}{b})\), where the fractional part is discarded.

Note: The expression is guaranteed to be valid and contains no parentheses.

inputFormat

The input consists of a single line containing the expression string. The expression may contain spaces which should be ignored.

Example: 3+2*2

outputFormat

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

Example: For the input 3+2*2, the output should be 7.

## sample
3+2*2
7