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

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	while (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    char []a;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);
        a = next().toCharArray();
        int n = a.length;
        List<Integer> p = new ArrayList<>();
        p.add(0);
        for(int i = 0; i < n; ++i) {
            if (a[i] == '*') {
                p.add(i);
            }
        }
        p.add(n);
        long ret = 0;
        for(int i = 0; i < p.size(); ++i) {
            for(int j = i + 1; j < p.size(); ++j) {
                ret = Math.max(ret, tryIt(p.get(i), p.get(j)));
            }
        }

        out.println(ret);
        out.close();
    }

    private long tryIt(int open, int close) {
        int n = a.length, at = 0;
        char []b = new char[n + 2];
        for(int i = 0; i < n; ++i) {
            if (i == open) {
                if (i == 0) {
                    b[at++] = '(';
                    b[at++] = a[i];
                }else {
                    b[at++] = a[i];
                    b[at++] = '(';
                }
            }else if (i == close) {
                b[at++] = ')';
                b[at++] = a[i];
            }else {
                b[at++] = a[i];
            }
        }
        if (at < n + 2) b[at++] = ')';
        // System.out.println(new String(b));

        return polish(b);
    }

    Stack<Long> nums;
    Stack<Character> op;

    private long polish(char []a) {
        nums = new Stack<>();
        op = new Stack<>();

        for(int i = 0; i < a.length; ++i) {
            if (a[i] == '(') {
                op.add('(');
            }else if (a[i] == ')') {
                while(op.size() > 0 && op.peek() != '(') {
                    process(op.pop());
                }
                op.pop();
            }else {
                if (isOp(a[i])) {
                    while(op.size() > 0 && priority(op.peek()) >= priority(a[i])) {
                        process(op.pop());
                    }
                    op.add(a[i]);
                }else {
                    int j = i;
                    StringBuilder sb = new StringBuilder();
                    while(j < a.length && isNum(a[j])) {
                        sb.append(a[j]);
                        ++j;
                    }
                    long x = Long.parseLong(sb.toString());
                    nums.add(x);
                    i = j - 1;
                }
            }
        }
        while(op.size() > 0) process(op.pop());
        return nums.pop();
    }

    private boolean isOp(char x) {
        return "+*".indexOf(x) >= 0;
    }

    private boolean isNum(char x) {
        return '0' <= x && x <= '9';
    }

    private void process(char op) {
        long l = nums.pop(), r = nums.pop();
        if (op == '+') nums.add(l + r);
        if (op == '*') nums.add(l * r);
    }

    private int priority(char x) {
        if (x == '*') return 2;
        if (x == '+') return 1;
        return -1;
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}