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

public class P552E {

    public static long maxE(String s) {
        final int l = (s.length() + 1) / 2;

        final long[] lsum = new long[l];
        final long[] lpro = new long[l];
        lsum[0] = 0L;
        lpro[0] = 1L;
        int ld = s.charAt(0) - '0';
        for (int i = 1; i < l; i++) {
            final char o = s.charAt(2*i - 1);
            final int d = s.charAt(2*i) - '0';
            if (o == '+') {
                lpro[i] = 1L;
                lsum[i] = lsum[i-1] + lpro[i-1] * (long) ld;
            } else {
                lsum[i] = lsum[i-1];
                lpro[i] = lpro[i-1] * (long) ld;
            }
            ld = d;
        }
        long m = lsum[l-1] + lpro[l-1] * (long) ld;

        final long[] rsum = new long[l];
        final long[] rpro = new long[l];
        rsum[l-1] = 0L;
        rpro[l-1] = 1L;
        ld = s.charAt(2 * (l-1)) - '0';
        for (int i = l-2; i >= 0; i--) {
            final char o = s.charAt(2*i + 1);
            final int d = s.charAt(2*i) - '0';
            if (o == '+') {
                rpro[i] = 1L;
                rsum[i] = rsum[i+1] + rpro[i+1] * (long) ld;
            } else {
                rsum[i] = rsum[i+1];
                rpro[i] = rpro[i+1] * (long) ld;
            }
            ld = d;
        }
        assert rsum[0] + rpro[0] * (long) ld == m;
        
        for (int i = 0; i < l-1; i++) {
            long sum = 0;
            long pro = 1;
            ld = s.charAt(2*i) - '0';
            for (int j = i+1; j < l; j++) {
                final char o = s.charAt(2*j - 1);
                final int d = s.charAt(2*j) - '0';
                if (o == '+') {
                    sum += pro * (long) ld;
                    pro = 1;
                } else {
                    pro *= (long) ld;
                }
                long e = sum + pro * (long) d;
                // System.err.printf("i=%s, j=%s, e=%s, ", i, j, e);
                long t = lsum[i] + lpro[i] * e * rpro[j] + rsum[j];
                // System.err.printf("ls=%s, lp=%s, rp=%s, rs=%s, t=%s\n",
                //                   lsum[i], lpro[i], rpro[j], rsum[j], t);
                m = Math.max(m, t);
                ld = d;
            }
        }

        return m;
    }

    public static void main(String[] args) throws IOException {
        final BufferedReader in = new BufferedReader(
            new InputStreamReader(System.in));

        System.out.println(maxE(in.readLine()));
    }
}
