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.IOException;
import java.io.InputStreamReader;

public class brackets {
	private enum OP {
		ADD, MUL
	};

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		long max = 0;
		String line = in.readLine();
		int size = line.length() + 1;
		size /= 2;
		int[] digits = new int[size];
		OP[] ops = new OP[size + 1];
		ops[0] = OP.ADD;
		for (int i = 0, j = 0; i < size - 1; i++, j++) {
			digits[i] = line.charAt(j) - '0';
			j++;
			ops[i + 1] = (line.charAt(j) == '*') ? OP.MUL : OP.ADD;
		}
		digits[size - 1] = line.charAt(2 * size - 2) - '0';
		ops[size] = OP.ADD;
		max = calc(digits, ops, 0, size - 1);
		for (int i = 0; i < size; i++) {
			for (int j = i + 1; j < size; j++) {
				if (ops[i] == OP.ADD && ops[j + 1] == OP.ADD) {
					continue;
				}
				long sum = calc(digits, ops, i, j);
				if (sum > max) {
					max = sum;
				}
			}
		}
		System.out.println(max);
	}

	private static long calc(int[] digits, OP[] ops, int start, int end) {
		// find the previous + sign
		int i;
		for (i = start; i >= 1 && ops[i] == OP.MUL; i--) {
		}

		long p1 = calcPart(digits, ops, 0, i-1);
		long p2 = calcPart(digits, ops, start, end);

		int j;
		for (j = end+1; j <= digits.length && ops[j] == OP.MUL; j++) {
		}

		for (int k = i; k < start; k++) {
			p2 *= digits[k];
		}

		for (int k = end+1; k < j; k++) {
			p2 *= digits[k];
		}
		long p3 = 0;
		if (j < digits.length) {
			p3 = calcPart(digits, ops, j, digits.length - 1);
		}

		return p1 + p2 + p3;
	}

	private static long calcPart(int[] digits, OP[] ops, int startPos,
			int endPos) {
		long part = 0;
		long curVal = 1;
		for (int i = startPos; i <= endPos; i++) {
			if ( ops[i] == OP.ADD || i == startPos) {
				curVal = digits[i];
			} else {
				curVal *= digits[i];
			}
			if (ops[i + 1] == OP.ADD || i == endPos) {
				part += curVal;
				curVal = 1;
			}
		}
		return part;
	}
}
