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 {
	
	static class Assert {
		
		static void check(boolean e) {
			if (!e) {
				throw new Error();
			}
		}
	}
	
	static class Scanner {
		
		StreamTokenizer in;
		
		Scanner(Reader r) {
			in = new StreamTokenizer(new BufferedReader(r));
			in.resetSyntax();
			in.whitespaceChars(0, 32);
			in.wordChars(33, 255);
		}
		
		String next() {
			try {
				in.nextToken();
				Assert.check(in.ttype == in.TT_WORD);
				return in.sval;
			} catch (IOException e) {
				throw new Error(e);
			}
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
		
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream in) throws IOException {
            br = new BufferedReader(new InputStreamReader(in));
        }

        String next() {
            try {
                while (st == null || !st.hasMoreTokens()) {
                    st = new StringTokenizer(br.readLine());
                }
            } catch (IOException e) {
                System.err.println(e);
                System.exit(1);
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }
		
	double nextDouble() {
		return Double.parseDouble(next());
	}
    }
	
	FastScanner in;
	
	//Scanner in;

	PrintWriter out;
	int p = 0;
	
	char peek(String exp) {
		if (p != exp.length()) {
			return exp.charAt(p);
		}
		return '-';
	}
	
	char get(String exp) {
		if (p != exp.length()) {
			return exp.charAt(p++);
		}
		return '-';
	}
	
	long number(String exp) {
		long res = get(exp) - '0';
		while ('0' <= peek(exp) && peek(exp) <= '9') {
			res = 10 * res + (get(exp) - '0');
		}
		return res;
	}
	
	long factor(String exp) {
		if ('0' <= peek(exp) && peek(exp) <= '9') {
			return number(exp);
		} else if (peek(exp) == '(') {
			get(exp);
			long result = expression(exp);
			get(exp);
			return result;
		}
		return 0;
	}
	
	long term(String exp) {
		long res = factor(exp);
		while (peek(exp) == '*') {
			if (get(exp) == '*') {
				res *= factor(exp);
			}
		}
		return res;
	}
	
	long expression(String exp) {
		long res = term(exp);
		while (peek(exp) == '+') {
			if (get(exp) == '+') {
				res += term(exp);
			}
		}
		return res;
	}
	
	long eval(String exp) {
		return expression(exp);
	}
	
	void solve() {
		
		long ans = 0;
		
		String s = in.next();
		int n = s.length();
		
		LinkedList<Integer> pos = new LinkedList<Integer>();
		
		pos.add(-1);
		
		for (int i = 0; i < n; ++i) {
			if (s.charAt(i) == '*') {
				pos.add(i);
			}
		}
		
		pos.add(n);
		
		int size = pos.size();
		
		for (int i = 0; i < size - 1; ++i) {
			for (int j = i + 1; j < size; ++j) {
				String newExp = "";
				newExp += s.substring(0, pos.get(i) + 1);
				newExp += '(';
				newExp += s.substring(pos.get(i) + 1, pos.get(j));
				newExp += ')';
				newExp += s.substring(pos.get(j), n);
				p = 0;
				ans = Math.max(ans, eval(newExp));
			}
		}
		out.println(ans);
	}
	
	void run() {
		try {
			in = new FastScanner(System.in);
			out = new PrintWriter(System.out);
			//in = new Scanner(new FileReader("input.txt"));
			//out = new PrintWriter(new FileWriter("output.txt"));
		} catch (IOException e) {
			throw new Error(e);
		}
		try {
			solve();
		} finally {
			out.close();
		}
	}
	
	public static void main(String args[]) {
		new Main().run();
	}
}