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).
// practice with rainboy
import java.io.*;
import java.util.*;

public class CF552E extends PrintWriter {
	CF552E() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF552E o = new CF552E(); o.main(); o.flush();
	}

	void main() {
		byte[] cc = sc.next().getBytes();
		int l = cc.length;
		if (l == 1) {
			println(new String(cc));
			return;
		}
		byte[] cc_ = new byte[l + 4];
		for (int i = 0; i < cc.length; i++)
			cc_[i + 2] = cc[i];
		cc_[0] = '1'; cc_[1] = '*'; cc_[l + 2] = '*'; cc_[l + 3] = '1';
		cc = cc_;
		int n = (l - 1) / 2 + 2;
		long[] pp = new long[n]; long[] aa = new long[n];
		pp[0] = 0; aa[0] = cc_[0] - '0';
		for (int i = 1; i <= n - 2; i++) {
			int a = cc[i * 2] - '0';
			if (cc[i * 2 - 1] == '+') {
				pp[i] = pp[i - 1] + aa[i - 1];
				aa[i] = a;
			} else {
				pp[i] = pp[i - 1];
				aa[i] = aa[i - 1] * a;
			}
		}
		long[] qq = new long[n]; long[] bb = new long[n];
		qq[n - 1] = 0; bb[n - 1] = cc[n * 2] - '0';
		for (int i = n - 2; i >= 1; i--) {
			int b = cc[i * 2 + 2] - '0';
			if (cc[i * 2 + 3] == '+') {
				qq[i] = qq[i + 1] + bb[i + 1];
				bb[i] = b;
			} else {
				qq[i] = qq[i + 1];
				bb[i] = bb[i + 1] * b;
			}
		}
		long ans = 0;
		for (int i = 1; i <= n - 2; i++) {
			long p = 0;
			long a = cc[i * 2] - '0';
			for (int j = i; j <= n - 2; j++) {
				int b = cc[j * 2 + 2] - '0';
				if (cc[j * 2 + 1] == '+') {
					p += a;
					a = b;
				} else
					a *= b;
				byte u = cc[(i - 1) * 2 + 1];
				byte v = cc[(j + 1) * 2 + 1];
				long x;
				if (u == '+' && v == '+')
					x = pp[i - 1] + aa[i - 1] + (p + a) + bb[j + 1] + qq[j + 1];
				else if (u == '*' && v == '*')
					x = pp[i - 1] + aa[i - 1] * (p + a) * bb[j + 1] + qq[j + 1];
				else if (u == '+' && v == '*')
					x = pp[i - 1] + aa[i - 1] + (p + a) * bb[j + 1] + qq[j + 1];
				else
					x = pp[i - 1] + aa[i - 1] * (p + a) + bb[j + 1] + qq[j + 1];
				if (ans < x)
					ans = x;
			}
		}
		println(ans);
	}
}
