#K59597. Arithmetic Expression Evaluation

    ID: 30899 Type: Default 1000ms 256MiB

Arithmetic Expression Evaluation

Arithmetic Expression Evaluation

Given a string \(s\) representing a mathematical expression that includes positive integers and the operators \(+, -, *\), compute its value following the standard operator precedence rules (i.e., multiplication has higher precedence than addition and subtraction). Note that the expression does not contain any parentheses. For example, the expression 3+5*2-6 evaluates to 7 because it is interpreted as \(3+(5\times 2)-6\).

inputFormat

The input consists of a single line containing the expression string.

outputFormat

Output a single integer: the result of evaluating the expression.

## sample
3+5*2-6
7