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.math.BigInteger;
import java.util.Scanner;


public class A {
	static String S;
	static int N;
	
	public static BigInteger eval(int left, int right) {
		if (left > right) return BigInteger.ZERO;
		BigInteger ret = BigInteger.ZERO;
		BigInteger temp = BigInteger.valueOf(S.charAt(left) - '0');
		for (int i = left + 2; i <= right; i += 2) {
			if (S.charAt(i - 1) == '+') {
				ret = ret.add(temp);
				temp = BigInteger.valueOf(S.charAt(i) -'0');
			} else {
				temp = temp.multiply(BigInteger.valueOf(S.charAt(i) - '0'));
			}
		}
		ret = ret.add(temp);
		return ret;
	}

	public static int next(int i, int left, int right) {
		if (i < left) return i + 2;
		if (i > right) return i + 2;
		return right + 2;
	}

	public static BigInteger getNumber(int i, int left, int right) {
		if (i < left) return BigInteger.valueOf(S.charAt(i) - '0');
		if (i > right) return BigInteger.valueOf(S.charAt(i) - '0');
		return eval(left, right);
	}
	
	
	
	public static BigInteger eval2(int left, int right) {
		BigInteger temp = BigInteger.ZERO;
		BigInteger ret = BigInteger.ZERO;
		temp = getNumber(0, left, right);
		for (int i = next(0, left, right); i < N; i = next(i, left, right)) {
			if (S.charAt(i - 1) == '+') {
				ret = ret.add(temp);
				temp = getNumber(i, left, right);
			} else {
				if (temp.equals(BigInteger.ZERO)) {
					temp = getNumber(i, left, right);
				} else {
					temp = temp.multiply(getNumber(i, left, right));
				}
			}
		}
		ret = ret.add(temp);
		return ret;
	}
	
	public static void main (String[] args) {
		Scanner cin = new Scanner(System.in);
		S = cin.nextLine();
		N = S.length();
		int n_mul = 0;
		for (int i = 1; i < N; i+= 2) {
			if (S.charAt(i) == '*') {
				n_mul++;
			}
		}
		if (N == 1) {
			System.out.println(S);
			return ;
		}
		BigInteger ans = eval(0, N - 1);
		for (int i = 1; i < N; i += 2) {
			if (S.charAt(i) == '*') {
				{	
					BigInteger x = eval2(i + 1, N - 1);
					if (ans.compareTo(x) < 0) ans = x;
				}
				{
					BigInteger x = eval2(0, i - 1);
					if (ans.compareTo(x) < 0) ans = x;
				}
				for (int j = i + 2; j < N; j += 2) {
					if (S.charAt(j) == '*') {
						{	
							BigInteger x = eval2(i + 1, j - 1);
							if (ans.compareTo(x) < 0) ans = x;
						}
					}
				}
			}
		}
		System.out.println(ans);
	}
}
