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

public class E {
    static BigInteger eval(String s, int bstart, int bend){
        Stack<BigInteger> st = new Stack<BigInteger>();
        Stack<Integer> opp = new Stack<Integer>();
        for(int i = bstart+1; i < bend; i++){
            if(i % 2 == 1){
                if(s.charAt(i) == '*') opp.push(1);
                else opp.push(0);
            } else {
                st.push(BigInteger.valueOf(s.charAt(i) - '0'));
                if(!opp.empty() && opp.peek() == 1){
                    BigInteger a = st.pop();
                    BigInteger b = st.pop();
                    opp.pop();
                    BigInteger c = a.multiply(b);
                    st.push(c);
                }
            }
        }
        BigInteger res1 = BigInteger.ZERO;
        while(!st.empty()){
            res1 = res1.add(st.pop());
        }
        while(!opp.empty()) opp.pop();

        for(int i = 0; i < s.length(); i++){
            if(i % 2 == 1){
                if(s.charAt(i) == '*') opp.push(1);
                else opp.push(0);
            } else {
                if(i == bstart + 1) {
                    st.push(res1);
                    i = bend - 1;
                }
                else st.push(BigInteger.valueOf(s.charAt(i) - '0'));
                if(!opp.empty() && opp.peek() == 1){
                    BigInteger a = st.pop();
                    BigInteger b = st.pop();
                    opp.pop();
                    BigInteger c = a.multiply(b);
                    st.push(c);
                }
            }
        }
        BigInteger res = BigInteger.ZERO;
        while(!st.empty()){
            res = res.add(st.pop());
        }

        return res;
    }

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        ArrayList<Integer> bracks = new ArrayList<Integer>();
        bracks.add(-1);
        for(int i = 0; i < s.length(); i++){
            if(s.charAt(i) == '*') bracks.add(i);
        }
        bracks.add(s.length());
        BigInteger mini = BigInteger.ZERO;
        for(int i = 0; i < bracks.size(); i++) for(int j = i+1; j < bracks.size(); j++){
            mini = mini.max(eval(s, bracks.get(i), bracks.get(j)));
        }
        System.out.println(mini);
    }
}   