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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {

	// split de array
	public static int[] readInts(String cad) {
		String read[] = cad.split(" ");
		int res[] = new int[read.length];
		for (int i = 0; i < read.length; i++) {
			res[i] = Integer.parseInt(read[i]);
		}
		return res;
	}

	public static void main(String[] args) throws IOException {
		long inicio = System.currentTimeMillis();
		StringBuilder out = new StringBuilder();
		BufferedReader in;
		File archivo = new File("entrada");
		if (archivo.exists())
			in = new BufferedReader(new FileReader(archivo));
		else
			in = new BufferedReader(new InputStreamReader(System.in));

		char c[] = in.readLine().toCharArray();
		ArrayList<Character> k = new ArrayList<Character>();
		ArrayList<Integer> s = new ArrayList<Integer>();
		k.add('+');
		s.add(0);
		for (int i = 0; i < c.length; i++) {
			if (c[i] == '+' || c[i] == '*') {
				k.add(c[i]);
			} else {
				s.add(c[i] - '0');
			}
		}
		long dp[][] = new long[s.size() + 1][s.size() + 1];

		for (int i = 1; i < s.size(); i++) {
			long res = 0;
			long temp = 0;
			boolean flag = true;
			dp[i][i] = s.get(i);
			for (int j = i + 1; j < s.size(); j++) {
				if (k.get(j - 1) == '+') {
					dp[i][j] = dp[i][j - 1] + s.get(j);
					temp = 0;
					flag = true;
					res = dp[i][j];
				} else {
					if (temp == 0) {
						temp = s.get(j) * s.get(j - 1);
						dp[i][j] = dp[i][j - 1] + temp;
						if (flag) {
							dp[i][j] -= s.get(j - 1);
							if (res > 0)
								res -= s.get(j - 1);
						}
					} else {
						temp = s.get(j) * temp;
						dp[i][j] = res + temp;
					}
					flag = false;

				}
			}
		}
		long max = 0;
		long a = 0;
		for (int i = 1; i < s.size(); i++) {
			for (int j = i; j < s.size(); j++) {

				if (j == k.size()) {

					int index = i - 1;
					long r = dp[i][j];
					while (index > 0 && k.get(index) == '*') {
						r *= s.get(index);
						index--;
					}

					a = dp[1][index] + r;

					max = Math.max(a, max);

				} else if (k.get(j) == '*' || k.get(i - 1) == '+') {
					int der = j;
					long dr = dp[i][j];
					while (der < k.size() && k.get(der) == '*') {
						dr *= s.get(der + 1);
						der++;
					}

					int index = i - 1;
					long r = dr;
					while (index > 0 && k.get(index) == '*') {
						r *= s.get(index);
						index--;
					}

					a = dp[1][index] + r + dp[der + 1][s.size() - 1];

					max = Math.max(a, max);

				} else {

					int index = i - 1;
					long r = dp[i][j];

					while (index > 0 && k.get(index) == '*') {
						r *= s.get(index);
						index--;
					}

					int der = j;
					long dr = r;
					while (der < k.size() && k.get(der) == '*') {
						dr *= s.get(der + 1);
						der++;
					}

					a = dp[1][index] + dr + dp[der + 1][s.size() - 1];

				}

			}
		}
		System.out.println(max);

		if (archivo.exists())
			System.out.println("Tiempo transcurrido : "
					+ (System.currentTimeMillis() - inicio) + " milisegundos.");
	}
}
