#K86917. Arithmetic Expression Evaluation

    ID: 36971 Type: Default 1000ms 256MiB

Arithmetic Expression Evaluation

Arithmetic Expression Evaluation

You are given an arithmetic expression consisting of non-negative integers and the operators +, -, *, and /. Your task is to evaluate the expression and output the result as an integer. Note that the division operator should truncate towards zero. The expression may include spaces, and it follows the standard operator precedence where multiplication and division are performed before addition and subtraction.

For example, the expression \(3+2*2\) evaluates to \(7\), and \( 3/2 \) evaluates to \(1\). In the case of \( 3+5/2 \), the result is \(5\) because \(5/2\) is truncated to \(2\) before addition.

inputFormat

The input consists of a single line containing a valid arithmetic expression with non-negative integers and the operators +, -, *, and /. Spaces may be present in the expression.

outputFormat

Output a single integer representing the evaluated result of the arithmetic expression. The division operator should truncate towards zero.

## sample
3+2*2
7

</p>