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.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Artem Gilmudinov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Reader in = new Reader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}
}

class Task {

    char[] c;
    public void solve(int testNumber, Reader in, PrintWriter out) {
        c = in.rl().toCharArray();
        ArrayList<Integer> mul = new ArrayList<>();
        for(int i = 1; i < c.length; i += 2) {
            if(c[i] == '*') {
                mul.add(i);
            }
        }
        long ans = 0;
        if(mul.size() == 0) {
            for(int i = 0; i < c.length; i += 2) {
                ans += c[i] - '0';
            }
            out.println(ans);
            return;
        }
        for(int i = 0; i < mul.size(); i++) {
            long left = calc(0, mul.get(i) - 1);
            int j = mul.get(i);
            for(; j < c.length; j += 2) {
                if(c[j] == '*') {
                    left *= c[j + 1] - '0';
                } else {
                    j += 1;
                    break;
                }
            }
            left += calc(j, c.length - 1);
            ans = Math.max(ans, left);
        }
        for(int i = 0; i < mul.size(); i++) {
            long right = calc(mul.get(i) + 1, c.length - 1);
            int j = mul.get(i);
            for(; j >= 0; j -= 2) {
                if(c[j] == '*') {
                    right *= c[j - 1] - '0';
                } else {
                    j -= 1;
                    break;
                }
            }
            right += calc(0, j);
            ans = Math.max(ans, right);
        }
        for(int i = 0; i < mul.size(); i++) {
            for(int j = i + 1; j < mul.size(); j++) {
                long cur = calc(mul.get(i) + 1, mul.get(j) - 1);
                int j1, j2;
                j1 = mul.get(i);
                for(; j1 >= 0; j1 -= 2) {
                    if(c[j1] == '*') {
                        cur *= c[j1 - 1] - '0';
                    } else {
                        j1 -= 1;
                        break;
                    }
                }
                j2 = mul.get(j);
                for(; j2 < c.length; j2 += 2) {
                    if(c[j2] == '*') {
                        cur *= c[j2 + 1] - '0';
                    } else {
                        j2 += 1;
                        break;
                    }
                }
                cur += calc(0, j1);
                cur += calc(j2, c.length - 1);
                ans = Math.max(cur, ans);
            }
        }
        out.println(ans);

    }

    public long calc(int from, int to) {
        long res = 0;
        for(int i = from; i <= to;) {
            long cur = c[i] - '0';
            int j = i + 1;
            for(; j <= to; j += 2) {
                if(c[j] == '*') {
                    cur *= c[j + 1] - '0';
                } else {
                    j += 1;
                    break;
                }
            }
            i = j;
            res += cur;
        }
        return res;
    }

}

class Reader {
    private BufferedReader in;

    public Reader(InputStream in) {
        this.in = new BufferedReader(new InputStreamReader(in));
    }

    public String rl() {
        try {
            return in.readLine();
        } catch(IOException e) {
            throw new RuntimeException(e);
        }
    }

}

