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.StringTokenizer;


public class ProblemE {
    public static void main(String[] args) {
        int testMode = 0;
        String testInput = "1+1+1*1+1";
        /*-------------------------------------------------------------------------------------------------------*/
        FastReader in = new FastReader(testMode == 0 ? System.in : new ByteArrayInputStream(testInput.getBytes()));
        PrintWriter out = new PrintWriter(System.out);
        new ProblemSolver().solve(in, out);
        out.close();
    }
}

class ProblemSolver {
    long calc(char[] s, int i, int k, int t1, int t2) {
        long res = 0;
        for (int j = i; j < k; j++) {
            long b;
            if (j == t1) {
                b = calc(s, t1, t2, -1, -1);
                j = t2;
            } else {
                b = s[j++] - '0';
            }
            for (; j < k && s[j] == '*'; ) {
                j += 1;
                if (j == t1) {
                    b *= calc(s, t1, t2, -1, -1);
                    j = t2;
                } else {
                    b *= (s[j++] - '0');
                }
            }
            res += b;
        }
        return res;
    }

    void solve(FastReader in, PrintWriter out) {
        char[] s = in.nextToken().toCharArray();
        int[] lt = new int[100];
        int[] rt = new int[100];
        int n = 0;
        for (int i = 0; i < s.length; i++)
            if (s[i] == '*') {
                rt[n] = i;
                lt[n + 1] = i + 1;
                n++;
            }
        lt[0] = 0;
        rt[n] = s.length;

        long res = 0;
        for (int i = 0; i <= n; i++) {
            for (int k = i; k <= n; k++) {
                long ret = calc(s, 0, s.length, lt[i], rt[k]);
                res = Math.max(res, ret);
            }
        }

        out.println(res);
    }
}

class FastReader extends BufferedReader {
    private StringTokenizer st;

    public FastReader(InputStream is) {
        super(new InputStreamReader(is));
    }

    public String nextToken() {
        try {
            while (st == null || !st.hasMoreElements()) {
                st = new StringTokenizer(readLine());
            }
            return st.nextToken();
        } catch (IOException e) {
            return null;
        }
    }

    public int nextInt() {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() {
        return Long.parseLong(nextToken());
    }

    public int[] nextArrayInt(int size) {
        int[] ret = new int[size];
        for (int i = 0; i < size; i++) {
            ret[i] = nextInt();
        }
        return ret;
    }
}