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

public class D {

	public static void main(String[] args) throws Exception {

		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		String s = "0+1*" + sc.next() + "*1+0";
		long ans = evaluate(s);
		for(int i = 1; i < s.length(); i += 2) if(s.charAt(i) == '*')
			for(int j = i + 2; j < s.length(); j += 2) if(s.charAt(j) == '*')
			{
				int ni = i - 2; while(ni >= 0 && s.charAt(ni) == '*') ni -= 2;
				int nj = j + 2; while(nj < s.length() && s.charAt(nj) == '*') nj += 2;
				long before = evaluate(s.substring(0, ni));
				long after = evaluate(s.substring(nj + 1));
				long bMult = evaluate(s.substring(ni + 1, i));
				long aMult = evaluate(s.substring(j + 1, nj));
				long middle = evaluate(s.substring(i + 1, j));
				long cur = before + bMult * middle * aMult + after;
				ans = Math.max(ans, cur);
			}
		out.println(ans);
		out.close();
	}

	static long evaluate(String t)
	{
		if(t.isEmpty())
			return 0;
		long ans = 0, lst = t.charAt(0) - '0';
		for(int i = 1; i < t.length(); i += 2)
			if(t.charAt(i) == '+')
			{
				ans += lst;
				lst = t.charAt(i + 1) - '0';
			}
			else
				lst *= t.charAt(i + 1) - '0';
		ans += lst;
		return ans;
	}


	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public Scanner(FileReader s) throws FileNotFoundException {	br = new BufferedReader(s);}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException { return Double.parseDouble(next()); }

		public boolean ready() throws IOException {return br.ready();}
	}
}