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.io.*;
import java.math.*;
import java.util.*;

public class Main {

    static long[] numbers = new long[2503];
    static char[] operators = new char[2503];
    static int m;
    static Scanner scanner;
    static PrintWriter printWriter;

    public static long calc(int l, int r) {
        long ans = 0, last = numbers[l];
        for (int i = l; i <= r; i++)
        {
            if (operators[i] == '+') {
                ans += last;
                last = numbers[i + 1];
            }
            else {
                last *= numbers[i + 1];
            }
        }

        //printWriter.print(ans + last);
        //printWriter.print(' ');
        return ans + last;
    }

    public static long calcAns(int l, int r)
    {
        long ans = 0, last = numbers[0];
        for (int i = 0; i < l; i++)
        {
            if (operators[i] == '+') {
                ans += last;
                last = numbers[i + 1];
            }
            else {
                last *= numbers[i + 1];
            }
        }
        last *= calc(l + 1, r - 1) * numbers[r + 1];
        //printWriter.print(ans + last);
        //printWriter.print(' ');
        for (int i = r + 1; i < m; i++)
        {
            if (operators[i] == '+') {
                ans += last;
                last = numbers[i + 1];
            }
            else {
                last *= numbers[i + 1];
            }
        }
        //printWriter.print(ans + last);
        //printWriter.print(' ');
        return ans + last;
    }


    public static void main(String[] args) {
        scanner = new Scanner(System.in);
        printWriter = new PrintWriter(System.out);

        String s = scanner.next();
        //printWriter.println(s);

        String t = "1*";
        t = t.concat(s);
        t = t.concat("*1");
        int n = t.length();

        //printWriter.println(t);

        //printWriter.print(n);
        //printWriter.println();

        for (int i = 0; i < n; i += 2) {
            numbers[i / 2] = (int) t.charAt(i) - (int) '0';
        }

        for (int i = 1; i < n; i += 2) {
            operators[i / 2] = t.charAt(i);
        }

        m = (n - 1) / 2;

        /*for (int i = 0; i < m + 1; i++)
        {
            printWriter.print(numbers[i]);
            printWriter.print(' ');
        }
        printWriter.println();

        for (int i = 0; i < m; i++)
        {
            printWriter.print(operators[i]);
            printWriter.print(' ');
        }
        printWriter.println();*/

        long maxSum = -1;
        for (int i = 0; i < m; i++)
        {
            for (int j = i + 1; j < m; j++)
            {
                if (operators[i] == operators[j] && operators[i] == '*')
                {
                    /*printWriter.print(i);
                    printWriter.print(' ');
                    printWriter.print(j);
                    printWriter.print(' ');*/
                    long curSum = calcAns(i, j);
                    maxSum = Math.max(curSum, maxSum);
                    //printWriter.println();
                }
            }
        }

        printWriter.print(maxSum);
        printWriter.close();
    }
}
