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.util.*;

public class Main {
	public static void main(String args[]) throws FileNotFoundException {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new Solver().solve(in, out);
		out.close();
	}
}

class Segment{
	int start, end;
	Segment(int start, int end){
		this.start = start;
		this.end = end;
	}
}

class Solver{
	String s;
	ArrayList<Segment> multiplications;

	long compute(int start, int end){
		String s = this.s.substring(start, end);
		long res = 0;
		long temp = s.charAt(0)-'0';
		for(int i=2; i<s.length(); i+=2){
			if(s.charAt(i-1) == '*') temp *= s.charAt(i)-'0';
			else{
				res += temp;
				temp = s.charAt(i)-'0';
			}
		}
		res += temp;
		return res;
	}

 	void findMultiplications(){
 		multiplications = new ArrayList<>();
 		int start = 0, end = 0;
 		for(int i=1; i<s.length(); i+=2){
 			if(s.charAt(i) == '*') end += 2;
 			else{
 				if(start != end) multiplications.add(new Segment(start, end));
 				start = i+1; end = i+1;
 			}
 		}
 		if(start != end) multiplications.add(new Segment(start, end));
 	}

 	long bracketsToEnd(Segment mult){
 		long res = compute(mult.start, mult.end-1)*compute(mult.end, s.length());
 		if(mult.start-1 > 0) res += compute(0, mult.start-1);
 		return res;
 	}

 	long bracketsToStart(Segment mult){
 		long res = compute(0, mult.start+1)*compute(mult.start+2, mult.end+1);
 		if(mult.end+2 < s.length()) res += compute(mult.end+2, s.length());
 		return res;
 	}

 	long bracketsBetween(Segment a, Segment b){
 		long res = compute(a.start, a.end-1)*compute(a.end, b.start+1)*compute(b.start+2, b.end+1);
 		if(a.start-1 > 0) res += compute(0, a.start-1);
 		if(b.end+2 < s.length()) res += compute(b.end+2, s.length());
 		return res;
 	}

	public void solve(InputReader in, PrintWriter out){
		s = in.next();
		findMultiplications();
		long bestResult = compute(0, s.length());
		for(int i=0; i<multiplications.size(); i++){
			long possibleResult = bracketsToEnd(multiplications.get(i));
			if(possibleResult > bestResult) bestResult = possibleResult;

			possibleResult = bracketsToStart(multiplications.get(i));
			if(possibleResult > bestResult) bestResult = possibleResult;

			for(int j=i+1; j<multiplications.size(); j++){
				possibleResult = bracketsBetween(multiplications.get(i), multiplications.get(j));
				if(possibleResult > bestResult) bestResult = possibleResult;
			}
		}
		out.println(bestResult);
	}
}

class InputReader {
	public BufferedReader reader;
	String currentLine[];
	int token;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		currentLine = null;
		token = 0;
	}

	public String next(){
		while (currentLine == null || token >= currentLine.length) {
			try {
				currentLine = reader.readLine().split("\\s+");
				token = 0;
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return currentLine[token++];
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}
}
