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.*;
import java.io.*;
import java.math.*;
 
public class Main {
    static long a[] = new long[6000];
    static long b[] = new long[6000];
    static long xx,yy,x,y,k,ans;
    static int i,j,m,n;
    static String s,t;
    static void solve(int l, int r)
    {
        x = 0; y = a[l];
        for (int i = l; i < r; i++)
            if (b[i] == 1)
            {
               x += y; y = a[i+1];
            }
            else
                y *= a[i+1];
    }
    public static void main(String[] args) throws IOException{
        Scanner sc = new Scanner(System.in);//new File("input.txt"));
        PrintWriter pw = new PrintWriter(System.out);//new File("output.txt"));
        s = sc.next();
        t = "1*";
        t = t.concat(s);
        t = t.concat("*1");
        s = t;
        n = s.length();
        m = n/2;
        for (i = 0; i < n; i+=2)
            a[i/2] = (int)s.charAt(i) - (int)'0';
        for (i = 1; i < n; i+=2)
            if (s.charAt(i) == '+')
               b[i/2] = 1;
            else
                b[i/2] = 2;
        long max1 = 0;
        for (i = 0; i < m; i++)
            for (j = i+1; j < m; j++)
            if (b[i] == 2 && b[j] == 2)
            {
             solve(0,i);
             xx = x; yy = y;
             solve(i+1,j);
             yy *= x + y;
             long xxx = a[j];
             a[j] = yy;
             solve(j,m);
             max1 = Math.max(max1, xx+x+y);
             a[j] = xxx;
            }
        pw.println(max1);
       pw.close();
    }
}