#K89182. Evaluate Mathematical Expression

    ID: 37474 Type: Default 1000ms 256MiB

Evaluate Mathematical Expression

Evaluate Mathematical Expression

You are given a mathematical expression as a string containing integers and the operators + and -. In this problem, the expression must be evaluated strictly from left to right, ignoring the usual operator precedence.

For example, the expression \(3 + 5 - 2\) should be processed as \(3 + 5 = 8\) and then \(8 - 2 = 6\).

Your task is to compute and output the result of the given expression.

inputFormat

The input consists of a single line containing a mathematical expression. The tokens (integers and the operators '+' and '-') are separated by one or more spaces. Extra whitespace may appear before or after the expression.

outputFormat

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

## sample
3 + 5 - 2
6