#K6051. Evaluate Mathematical Expression

    ID: 31102 Type: Default 1000ms 256MiB

Evaluate Mathematical Expression

Evaluate Mathematical Expression

You are given a string representing a mathematical expression. The expression may contain non-negative integers, the operators \(+, -, \times, \div\) and parentheses \((\) and \()\). Your task is to evaluate the expression and output its integer result.

The evaluation should follow the usual operator precedence rules. Division is integer division (truncate toward zero).

Note: The input expression might contain spaces. You need to correctly handle nested parentheses as well.

inputFormat

The input consists of a single line containing a valid mathematical expression as a string.

outputFormat

Output a single integer which is the result of evaluating the expression.

## sample
5
5