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

public class Main {
	private final int MAX = 1000;

	public void solve() {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		sc.close();
		if (input.length() == 1) {
			System.out.println(input);
			return;
		}

		long max = muliply(input);
		for (int i = 0; i < input.length(); i += 2) {
			if (i > 0 && input.charAt(i - 1) == '+' && (i == 2 || input.charAt(i - 3) == '+')) {
				continue;
			}
			for (int j = i + 2; j < input.length(); j += 2) {
				if (j < input.length() - 1 && input.charAt(j + 1) == '+'
						&& (j == input.length() - 3 || input.charAt(j + 3) == '+')) {
					continue;
				}

				String newS = "";
				if (i > 0) {
					newS += input.substring(0, i);
				}
				long m = muliply(input.substring(i, j + 1));
				newS += String.valueOf(m);
				if (j + 1 < input.length()) {
					newS += input.substring(j + 1, input.length());
				}
				max = Math.max(max, muliply(newS));
			}
		}
		System.out.println(max);
	}

	private long muliply(String string) {
		String[] sp = string.split("\\+");
		for (int i = 0; i < sp.length; i++) {
			if (sp[i].indexOf("*") != -1) {
				String[] mul = sp[i].split("\\*");
				long a = 1;
				for (int j = 0; j < mul.length; j++) {
					if (mul[j].length() > 0) {
						a *= Long.parseLong(mul[j]);
					}
				}
				sp[i] = String.valueOf(a);
			}
		}

		long ans = 0;
		for (int i = 0; i < sp.length; i++) {
			if (sp[i].length() > 0) {
				ans += Long.parseLong(sp[i]);
			}
		}
		return ans;
	}

	private int nextInt() {
		int c;
		try {
			c = System.in.read();
			while (c != '-' && (c < '0' || c > '9'))
				c = System.in.read();
			if (c == '-')
				return -nextInt();
			int res = 0;
			while (c >= '0' && c <= '9') {
				res = res * 10 + c - '0';
				c = System.in.read();
			}
			return res;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return -1;
	}

	private int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	public static void main(String[] args) {
		new Main().solve();
	}

}