#C2394. Evaluate Mathematical Expression

    ID: 45705 Type: Default 1000ms 256MiB

Evaluate Mathematical Expression

Evaluate Mathematical Expression

You are given a mathematical expression as a string. The expression may contain non-negative integers, the operators ++, -, *, //, and parentheses (  )( \; ) to override the default operator precedence. Your task is to evaluate the expression and output the result.

The operator precedence follows the standard rules: multiplication and division have higher precedence than addition and subtraction. For division, use floating-point division.

For example, (2 + 3 * 4 = 14) and (100 * (2+12)/14 = 100.0).

inputFormat

The input consists of a single line containing the mathematical expression. The expression may include spaces between tokens.

outputFormat

Output the evaluated result of the expression. For expressions that involve division, output the floating point result.## sample

2 + 3
5