Arithmetic
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Specifies the expression that contains only numbers and operations + and *. Calculate the value of the expression, assuming that the operations * and + have the same priority. In this case 2 + 2 * 2 equals 8.
Input
Given non-empty string S with no more than 9 characters. S line contains only numbers, and operators + and *. S always starts with a number and sets the correct recording of an arithmetic expression. Left and right of each operation is a figure to the left and to the right of each digit is placed or the beginning \ end of line, or a mathematical operation.
Output
Print the result of expression.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 5K
Acceptance rate 59%