p01725 Unordered Operators
One day, Ikta, an elementary school student, received a piece of paper with mathematical formulas from his grandfather. Apparently, the grandfather will give you as much money as the answer to the formula. Ikta has only learned addition, subtraction, and multiplication, so only addition, subtraction, and multiplication are used in mathematical formulas. In normal calculation, multiplication must be calculated before addition and subtraction, but Ikta had a vague understanding of operator precedence, so for the time being, it is convenient to maximize the calculation result of the formula. I decided to consider a good priority.

Given the three binary operators + − × and a formula containing parentheses. Change the precedence of the three operators as you like and answer the calculation result when the formula is maximized.

However, note the following points.

* Operators are always left-associative. (Operators with the same precedence are always calculated from the left side of the formula.)
* Different operators may have the same precedence.
* Do not change the priority while calculating one formula.



Input

The input is given in the following format.
A formula consisting of numbers from 0 to 9 and the operators'+','-','*' and parentheses'(',')'


* To be precise, the input is in the format shown in BNF below.



> <expr> :: = (<expr>) | <number> | <expr> <op> <expr>
> <op> :: = + |-| *

<number> represents a non-negative integer.

Constraints

The input satisfies the following constraints.

* The formula is 200 characters or less.
* No matter what priority is set, it will not overflow as a result of calculation or in the middle of it as a 64-bit integer type.

Output

Output the maximum value obtained from the formula in one line.

Examples

Input

3-2*3


Output

3


Input

(5-3*4)*(0-2+1)


Output

21


Input

1-2+3-4+5-6*0


Output

3


Input

(1989967-3*1-211+4487)


Output

8511076028
```python
from sys import setrecursionlimit
setrecursionlimit(10 ** 8)

O = {'+': lambda l, r: l + r,
     '-': lambda l, r: l - r,
     '*': lambda l, r: l * r}

P = {'+': 0,
     '-': 0,
     '*': 0}

class Source():
    def __init__(self, S, i=0):
        self.S = S
        self.pos = i

def peek(S):
    return S.S[S.pos] if S.pos < len(S.S) else 'a'

def next(S):
    S.pos += 1

def expr(S, i):
    # print(S.pos)
    if i == 0:
        left = factor(S)
    else:
        left = expr(S, i - 1)

    while peek(S) in O and P[peek(S)] == i:
        ope = peek(S)
        next(S)
        if i == 0:
            right = factor(S)
        else:
            right = expr(S, i - 1)
            
        left = O[ope](left, right)
        
    # print(left, i)
    return left


def factor(S):
    if peek(S) == '(':
        next(S)
        res = expr(S, 2)
        next(S)
    else:
        res = num(S)
    return res

def num(S):
    sign = 1
    if peek(S) == '-':
        sign = -1
        next(S)
    res = 0
    while '0' <= peek(S) <= '9':
        res = res * 10 + int(peek(S))
        next(S)

    return sign * res

S = input()
ans = -int(1e19)

for plus in range(3):
    P['+'] = plus
    for minus in range(3):
        P['-'] = minus
        for times in range(3):
            P['*'] = times
            ans = max(ans, expr(Source(S), 2))
            
print(ans)

```