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).
import java.util.Scanner;

public class Solution {
    // Evaluate the value of an expression segment [l, r)
    public static long eval(char[] expression, int l, int r, long subtitution) {
        long result = 0;
        long lastNumber = 0;
        boolean isLastOperatorMultiply = false;
        for (int i = l; i < r; i++) {
            char c = expression[i];
            switch (c) {
            case '+':
                result += lastNumber;
                isLastOperatorMultiply = false;
                break;
            case '*':
                isLastOperatorMultiply = true;
                break;
            default:
                long value = c - '0';
                if (c == 's')
                    value = subtitution;
                if (isLastOperatorMultiply)
                    lastNumber *= value;
                else
                    lastNumber = value;
                break;
            }
        }

        return result += lastNumber;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] expression = scanner.next().toCharArray();
        long max = 0;
        for (int l = 0; l < expression.length; l += 2) {
            if (l > 0 && expression[l - 1] == '+')
                continue;
            for (int r = l + 1; r <= expression.length; r += 2) {
                if (r < expression.length && expression[r] == '+')
                    continue;

                char[] newExpression = new char[l + 1 + expression.length - r];

                System.arraycopy(expression, 0, newExpression, 0, l);
                newExpression[l] = 's';
                System.arraycopy(expression, r, newExpression, l + 1,
                        expression.length - r);

                max = Math.max(
                        max,
                        eval(newExpression, 0, newExpression.length,
                                eval(expression, l, r, 1)));
            }
        }

        System.out.println(max);
    }
}
