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

public class Main {
	public static BigInteger cal(int[] a, int[] op, int l, int r) {
		BigInteger res = BigInteger.ZERO;
		BigInteger x = BigInteger.valueOf(a[l]);
		for(int i = l; i < r; i++) {
			if(op[i] == 0) {
				res = res.add(x);
				x = BigInteger.valueOf(a[i+1]);
			}else{
				x = x.multiply(BigInteger.valueOf(a[i+1]));
			}
		}
		return res.add(x);
	}
	public static BigInteger cal2(BigInteger[] a, int[] op, int n) {
		BigInteger res = BigInteger.ZERO;
		BigInteger x = a[0];
		for(int i = 1; i < n; i++) {
			if(op[i-1] == 0) {
				res = res.add(x);
				x = a[i];
			}else{
				x = x.multiply(a[i]);
			}
		}
		return res.add(x);
	}
 	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int[] a = new int[5010];
		int[] op = new int[5010];
		
		BigInteger[] b = new BigInteger[5010];
		int[] op2 = new int[5010];
		
		int n;
		String s = in.nextLine();
		a[0] = s.charAt(0)-'0';
		for(n = 0; n*2+2 < s.length(); n++) {
			op[n] = s.charAt(n*2+1) == '+'?0:1;
			a[n+1] = s.charAt(n*2+2)-'0';
		}
		BigInteger ans = BigInteger.ZERO;
		
		int L = 0, R = n;
		for(int i = 0; i <= n; i++) if(i == 0 || op[i-1] == 1){
			for(int j = i; j <= n; j++) if(j == n || op[j] == 1) {
				BigInteger m = cal(a, op, i, j);
				int c = 0;
				for(int k = 0; k < i; k++) {
					b[c] = BigInteger.valueOf(a[k]);
					op2[c] = op[k];
					c++;
				}
				b[c] = m; if(j!=n) op2[c] = op[j];
				c++;
				for(int k = j+1; k <= n; k++) {
					b[c] = BigInteger.valueOf(a[k]);
					if(k != n) op2[c] = op[k];
					c++;
				}
				BigInteger r = cal2(b, op2, c);
				
				if(r.compareTo(ans) > 0) {
					ans = r;
					L = i; R = j;
				}
			}
		}
		
		
		/*System.out.println(cal(a, op, L, R));
		for(int i = 0; i <= n; i++) {
			if(L == i) System.out.print("(");
			System.out.print(a[i]);
			if(R == i) System.out.print(")");
			if(i != n) System.out.print(op[i] == 0?"+":"*");
		}
		System.out.println();
		*/
		System.out.println(ans);
	}
}