#K231. Evaluate Mathematical Expression
Evaluate Mathematical Expression
Evaluate Mathematical Expression
You are given a string expression representing a mathematical expression. The expression contains non-negative integers and the operators \( + \), \( - \), \( * \), and \( / \). It is guaranteed that the expression is valid and does not contain any parentheses. For division, perform integer division with truncation toward zero.
Your task is to evaluate the expression and output its result.
inputFormat
The input consists of a single line containing the mathematical expression. The expression may include spaces.
Example:
3+2*2
outputFormat
Output a single integer which is the result of the evaluated expression.
Example:
7## sample
3+2*2
7