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

public class Main {
	static long evaluate (String s,int start,int end,long val){
		Stack<Long> stack = new Stack<Long>();
		for(int i=0;i<s.length();i++){
			if(i==start){
				if(!stack.isEmpty()){
					stack.pop();
					long x= stack.pop()*val;
					stack.push(x);
				}
				else
					stack.push(val);
				i = end-1;
				continue;
			}
			if(!stack.isEmpty() && stack.peek()==-2){
				stack.pop();
				long x = stack.pop()*(s.charAt(i)-'0');
				stack.push(x);
				continue;
			}
			if(s.charAt(i)=='+')
				stack.push((long)-1);
			else if(s.charAt(i)=='*')
				stack.push((long)-2);
			else
				stack.push((long)s.charAt(i)-'0');
		}
		long res = 0;
		while(!stack.isEmpty()){
			if(stack.peek()<0)
				stack.pop();
			else
				res+=stack.pop();
		}
		return res;
	}
	public static void main(String[] args)throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s= br.readLine();
		ArrayList<Integer> times = new ArrayList<Integer>();
		times.add(times.size(), -1);
		for(int i=0;i<s.length();i++){
			if(s.charAt(i)=='*')
				times.add(times.size(), i);
		}
		times.add(times.size(), s.length());
		long max=-1;
		for(int i=0;i<times.size()-1;i++){
			for(int j=i+1;j<times.size();j++){
				int start = times.get(i)+1,end = times.get(j);
				String before,after;
				String temp = s.substring(start,end);
				long x1 = evaluate(temp,-1,-1,-1);
				long x2 = evaluate(s,start,end,x1);
				if(x2>max){
					max=x2;
//					System.out.println(start+"!!"+end+"!!"+x1);
				}
			}
		}
		System.out.println(max);
	}
}
