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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class VanyaBrackets {
    void solve() {
        String s = in.nextToken();
        int n = s.length() / 2;
        int m = 0;
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i * 2 + 1);
            if (c == '*') {
                m++;
            }
        }

        int[] L = new int[m + 1], R = new int[m + 1];
        L[0] = 0;
        R[m] = s.length() - 1;
        int x = 1, y = 0;
        for (int i = 0; i < n; i++) {
            char c = s.charAt(i * 2 + 1);
            if (c == '*') {
                L[x++] = i * 2 + 2;
                R[y++] = i * 2;
            }
        }

        long ans = eval(s, 0, s.length() - 1, 0);
        for (int l : L) {
            for (int r : R) {
                if (l > r) continue;
                long t = eval(s, l, r, 0);
                String ss = s.substring(0, l) + "?" + s.substring(r + 1);
                ans = Math.max(ans, eval(ss, 0, ss.length() - 1, t));
            }
        }

        out.println(ans);
    }

    private long eval(String s, int l, int r, long t) {
        if (l > r) return 1;
        long sum = 0, cur = s.charAt(l) == '?' ? t : s.charAt(l) - '0';
        for (int i = l + 1; i <= r; i += 2) {
            char c = s.charAt(i);
            long next = s.charAt(i + 1) == '?' ? t : s.charAt(i + 1) - '0';
            if (c == '*') {
                cur *= next;
            } else {
                sum += cur;
                cur = next;
            }
        }
        sum += cur;
        return sum;
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new VanyaBrackets().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
