Vanya is doing his maths homework. He has an expression of form <image>, where x1, x2, ..., xn are digits from 1 to 9, and sign <image> represents either a plus '+' or the multiplication sign '*'. Vanya needs to add one pair of brackets in this expression so that to maximize the value of the resulting expression.

Input

The first line contains expression s (1 ≤ |s| ≤ 5001, |s| is odd), its odd positions only contain digits from 1 to 9, and even positions only contain signs  +  and  * . 

The number of signs  *  doesn't exceed 15.

Output

In the first line print the maximum possible value of an expression.

Examples

Input

3+5*7+8*4


Output

303


Input

2+3*5


Output

25


Input

3*4*5


Output

60

Note

Note to the first sample test. 3 + 5 * (7 + 8) * 4 = 303.

Note to the second sample test. (2 + 3) * 5 = 25.

Note to the third sample test. (3 * 4) * 5 = 60 (also many other variants are valid, for instance, (3) * 4 * 5 = 60).
# -*- coding: utf-8 -*-
__author__ = 'artbataev'

# from sys import setrecursionlimit
# setrecursionlimit(100000)

def countExpression(i, j):
    global matr, numbers, operations

    if (i == 0 or operations[i - 1] == "+"):
        return matr[j] - (0 if i == 0 else matr[i-1])

    cur = numbers[i]
    k = i
    while k < j and operations[k] == "*":
        cur *= numbers[k + 1]
        k += 1
    if k >= j:
        return cur
    else:
        return cur + matr[j] - matr[k]


s = input().strip()
# with open("input.txt", encoding="utf-8") as file:
#     s = file.readline().strip()

numbers = list(map(int, s[::2]))
operations = s[1::2]

n = len(numbers)


matr = [0 for i in range(n)]
matr[0] = numbers[0]

for i in range(1, n):
    if operations[i-1] == "+":
        matr[i] = matr[i-1] + numbers[i]
    else:
        k = i-1
        cur = numbers[i]
        while k >= 0 and operations[k] == "*":
            cur *= numbers[k]
            k -= 1
        if k < 0:
            matr[i] = cur
        else:
            matr[i] = matr[k] + cur

maxRes = matr[n-1]

for i in range(n - 1):
    if i == 0 or operations[i - 1] == "*":
        for j in range(i + 1, n):
            curExpr = countExpression(i, j)
            i1 = i - 1

            while i1 >= 0 and operations[i1] == "*":
                curExpr *= numbers[i1]
                i1 -= 1

            j1 = j
            while j1 < n-1 and operations[j1] == "*":
                curExpr *= numbers[j1 + 1]
                j1 += 1
            if i1 >= 0:
                curExpr += matr[i1]
            if j1 + 1 <= n-1:
                curExpr += matr[n-1] - matr[j1]

            # if curExpr > maxRes:
            #     print(i, j)
            maxRes = max(maxRes, curExpr)

print(maxRes)