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


public class E {
	
	static BufferedReader in;
	
	static String s;
	
	static ArrayList<Long> nums;
	static ArrayList<String> syms;
	
	public static void main(String[] args) throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		s = in.readLine();
		nums = new ArrayList<Long>();
		syms = new ArrayList<String>();
		String[] num = s.split("[*+]");
		String[] sym = s.split("[123456789]");
		for(int i = 0 ; i < num.length ; ++i)
			if(i == 0) nums.add(Long.parseLong(num[i]));
			else {
				syms.add(sym[i]);
				nums.add(Long.parseLong(num[i]));
			}
		for(int i = 2 ; i < syms.size() ; ++i) {
			if((i < syms.size()) && (i-1 < syms.size()) && 
					(i-2 < syms.size()) && 
					(comp(i) && comp(i-1) && comp(i-2))) {
				syms.remove(i-1);
				long x = nums.get(i);
				long y = nums.get(i-1);
				nums.remove(i);
				nums.add(i, x + y);
				nums.remove(i-1);
				--i;
			}
		}
		long ans = evaluate(new ArrayList<Long>(nums), 
				            new ArrayList<String>(syms));
		for(int i = 0 ; i < nums.size() ; ++i) {
			for(int j = i+1 ; j < nums.size() ; ++j) {
				ArrayList<Long> temp_n = new ArrayList<Long>();
				ArrayList<String> temp_s = new ArrayList<String>();
				for(int k = i ; k <= j ; ++k) {
					temp_n.add(nums.get(k));
					if(k < j) temp_s.add(syms.get(k));
				}
				long val = evaluate(temp_n, temp_s);
				ArrayList<Long> alln = new ArrayList<Long>();
				ArrayList<String> alls = new ArrayList<String>();
				for(int k = 0 ; k < i ; ++k) {
					alln.add(nums.get(k));
					alls.add(syms.get(k));
				}
				alln.add(val);
				for(int k = j+1 ; k < nums.size() ; ++k) {
					alln.add(nums.get(k));
					alls.add(syms.get(k-1));
				}
				ans = Math.max(ans, evaluate(alln, alls));
			}
		}
		System.out.println(ans);
	}
	
	static boolean comp(int i) {
		return syms.get(i).equals("+");
	}
	
	static long evaluate(ArrayList<Long> num, ArrayList<String> sym) {
		for(int i = 0 ; i < sym.size() ; ++i)
			if(sym.get(i).equals("*")) {
				long val = num.get(i) * num.get(i+1);
				num.remove(i+1);
				num.add(i+1, val);
				num.remove(i);
				sym.remove(i);
				i = -1;
			}
		for(int i = sym.size() - 1 ; i >= 0 ; --i) {
			long x = num.get(num.size()-1);
			num.remove(num.size()-1);
			long y = num.get(num.size()-1);
			num.remove(num.size()-1);
			num.add(x + y);
		}
		return num.get(num.size()-1);
	}

}
