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

public class TaskC {
    private final InputReader reader;
    private final OutputWriter writer;

    public TaskC(InputReader reader, OutputWriter writer) {
        this.reader = reader;
        this.writer = writer;
    }

    public static void main(String[] args) {
        InputReader reader = new InputReader(System.in);
        OutputWriter writer = new OutputWriter(System.out);
        new TaskC(reader, writer).run();
        writer.writer.flush();
    }

    int[] A;
    int[] tp;

    class Pair {
        long x, y;
        Pair(long x, long y) {
            this.x = x;
            this.y = y;
        }
    }

    long get(int l, int r) {
        if (l > r)
            return 1;
        long cur = A[l];
        long sum = 0;
        for (int i = l + 1; i <= r; i++) {
            if (tp[i] == 1) {
                sum += cur;
                cur = A[i];
            } else {
                cur *= A[i];
            }
        }
        return sum + cur;
    }

    public void run() {
        char[] buf = reader.next().toCharArray();
        A = new int[buf.length / 2 + 1];
        int n = A.length;
        for (int i = 0; i < n; i++)
            A[i] = buf[2 * i] - '0';
        tp = new int[n];
        tp[0] = 0;
        int stars = 0;
        for (int i = 1; i < n; i++) {
            tp[i] = buf[2 * i - 1] == '+' ? 1 : 0;
            stars += 1 - tp[i];
        }
        stars++;
        int[] pos = new int[stars * 2 + 2];
        int pt = 0;
        for (int i = 0; i < n; i++) {
            if (tp[i] == 0) {
                pos[pt++] = i;
                pos[pt++] = i - 1;
                if (pos[pt - 1] < 0)
                    pos[pt - 1] = 0;
            }
        }
        pos[pt++] = 0;
        pos[pt++] = n - 1;

        Arrays.sort(pos);
        pt = 1;
        for (int i = 1; i < pos.length; i++)
            if (pos[i] != pos[pt - 1])
                pos[pt++] = pos[i];
        pos = Arrays.copyOfRange(pos, 0, pt);
        long best = 0;
        for (int l : pos) {
            for (int r : pos) {
                if (l > r)
                    continue;
                long val = get(l, r);
                long sum = 0, cur = (l == 0) ? val : A[0];
                for (int i = (l == 0) ? r + 1 : 1; i < n; i++) {
                    long w = (i == l) ? val : A[i];
                    if (tp[i] == 1) {
                        sum += cur;
                        cur = w ;
                    } else {
                        cur *= w;
                    }
                    if (i == l)
                        i = r;
                }
                sum += cur;
                best = Math.max(best, sum);
            }
        }
        writer.printf("%d\n", best);
    }


    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

    static class OutputWriter {
        public PrintWriter writer;

        OutputWriter(OutputStream stream) {
            writer = new PrintWriter(stream);
        }

        public void printf(String format, Object... args) {
            writer.print(String.format(Locale.ENGLISH, format, args));
        }
    }
}

