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
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    private String s;
    private int n;
    private short[][] last_plus;
    private short[] first_plus;
    private long value1, value2, value3, value4, value5, value;
    private ArrayList<Integer> pos;

    private int Convert(char c) {
        return (int) c - (int) '0';
    }

    long Cal(int first, int last) {
        long res = 1;
        for(int i = first; i <= last; i += 2)
            res = res * Convert(s.charAt(i));
        return res;
    }

    private long Sum(int first, int last) {
        if (last_plus[first][last] == -1) return Cal(first, last);
        return Sum(first, last_plus[first][last] - 1) + Sum(last_plus[first][last] + 1, last);
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        s = in.nextLine();
        s = "1*" + s + "*1";

        n = s.length();

        pos = new ArrayList<>();
        last_plus = new short[n][n];
        first_plus = new short[n];

        for (int i = 0; i < n; ++i) {
            first_plus[i] = -1;
            for (int j = 0; j < n; ++j) {
                last_plus[i][j] = -1;
            }
        }


        for (int i = 0; i < n; ++i)
            if (s.charAt(i) == '*') pos.add(i);

        short first = -1;
        for (int i = n - 1; i >= 0; i -= 2) {
            if (i + 1 < n && s.charAt(i + 1) == '+') first = (short) (i + 1);
            first_plus[i] = first;
        }

        for (int i = 0; i < n; i += 2) {
            short last = -1;
            last_plus[i][i] = -1;
            for (int j = i + 2; j < n; j += 2) {
                if (s.charAt(j - 1) == '+') last = (short) (j - 1);
                last_plus[i][j] = last;
            }
        }

        long res = 0;
        for (int i = 0; i < pos.size(); ++i)
            for (int j = i + 1; j < pos.size(); ++j) {
                value1 = 0; value5 = 0;

                int i1 = pos.get(i), j1 = pos.get(j);
                if (last_plus[0][i1 - 1] == -1)
                    value2 = Sum(0, i1 - 1);
                else {
                    value1 = Sum(0, last_plus[0][i1 - 1] - 1);
                    value2 = Sum(last_plus[0][i1 - 1] + 1, i1 - 1);
                }
                value3 = Sum(i1 + 1, j1 - 1);
                if (first_plus[j1 + 1] == -1)
                    value4 = Sum(j1 + 1,n - 1);
                else {
                    value4 = Sum(j1 + 1,first_plus[j1 + 1] - 1);
                    value5 = Sum(first_plus[j1 + 1] + 1,n - 1);
                }

                value = value2 * value3 * value4;
                value = value1 + value + value5;

                res = Math.max(res, value);
            }

        out.print(res);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            String line = reader.readLine();
            if (line == null)
                throw new UnknownError();
            return line;
        } catch (Exception e) {
            throw new UnknownError(e.getMessage());
        }
    }

}

