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.util.*;

public class D2_308E {
    public static String filename = "test";
    static long x, y;
    static long [] a;
    static int [] b;
    static void solve(int l, int r) {
        x = (long)0;
        y = (long)a[l];
        for (int i = l; i < r ; i++) {
            if (b[i] == 1) {
                x += y;
                y = (long)a[i+1];
            }
            else {
                y = (long)y*a[i+1];
            }
        }
    }
    public static void main(String [] args) throws IOException {
        // BufferedReader in = new BufferedReader(new FileReader(filename+".in"));
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new BufferedWriter(new
            OutputStreamWriter(System.out)));
        String s = in.readLine();
        String t = "1*";
        t = t.concat(s);
        t = t.concat("*1");
        s = t;
        int m = s.length();
        a = new long[m/2 + 1];
        b = new int[m/2 + 1];
        for (int i = 0; i < m; i+=2) {
            a[i/2] = (long)s.charAt(i) - (long)('0');
        }
        for (int i = 1; i < m; i+=2) {
            if (s.charAt(i) == '+') {
                b[i/2] = 1;
            }
            else {
                b[i/2] = 2;
            }
        }
        long max =0;
        for (int i = 0; i < (m/2 + 1); i++) {
            for (int j = i+1; j < (m/2 + 1); j++) {
                if (b[i] == 2 && b[j] == 2) {
                    solve(0, i);
                    long xx = x;
                    long yy = y;
                    solve(i+1, j);
                    long inner = yy* (x+y);
                    long a1 = a[j+1];
                    a[j+1] = (inner) * a[j+1];
                    solve(j+1, m/2);
                    a[j+1] = a1;
                    max = Math.max(max, xx + x + y);
                }
            }
        }
        System.out.println(max);
        in.close();
        out.close();
        System.exit(0);
    }
}
