E. Expression Evaluation
time limit per test
3 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

In the enchanted kingdom of Arithmora, wizards cast spells using arithmetic expressions. Each spell is a string consisting only of:

  • single-digit numbers ("0"–"9"),
  • the addition operator ("+"), and
  • the multiplication operator ("*").

When a wizard chants the spell, the kingdom's ancient laws dictate that:

  1. Multiplication ("*") has higher precedence than addition ("+"), and
  2. Both operators are left-associative (evaluated from left to right if they have equal precedence).

For example:

  • The spell 2+3*4 is evaluated as $$$2+(3*4)=14$$$.
  • The spell 9*1+5*2 is evaluated as $$$(9*1)+(5*2)=19$$$.

Your task is to compute the final value of the given spell expression.

Input

The input contains a single line string $$$S$$$, the spell expression.

  • $$$S$$$ only contains digits ("0"–"9"), "+" and "*".
  • $$$1 \leq |S| \leq 1000$$$.
  • The expression is valid (no leading/trailing operators, no consecutive operators).
  • the results can be greater than $$$2^{64}$$$.
Output

Output a single integer: the value of the expression.

Examples
Input
2*3+4
Output
10
Input
3*4+5*6*7
Output
222
Input
2*3*0*1*5+5*5*5*5*5
Output
3125