#K5356. Expression Evaluation

    ID: 29558 Type: Default 1000ms 256MiB

Expression Evaluation

Expression Evaluation

You are given a simple mathematical expression as a string containing non-negative integers, plus (+) and minus (-) operators, and spaces. Your task is to evaluate this expression and output the result as an integer.

The expression is evaluated from left to right without any additional precedence rules. Formally, for any two integers \(a\) and \(b\), the operations are defined as: $$a+b$$ and $$a-b$$.

inputFormat

The input consists of a single line from standard input containing the expression.

outputFormat

Output a single integer to standard output which is the evaluated result of the expression.## sample

3 + 5
8

</p>