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

public class Main {
    public static void main(String[] args) throws Exception {
        IOUtils ut = new IOUtils(System.in, System.out);
        new Solution(ut);
        ut.close();
    }
}

class Solution {
    IOUtils io;
    String formula;

    public Solution(IOUtils io) throws Exception {
        this.io = io;

        formula = "1*" + io.read() + "*1";
        int n = formula.length();

        long ans = 0;
        Pair<Long, Long> tmp = solve(0, n - 1);
        ans = tmp.first + tmp.second;

        for (int i = 2; i < n; i += 2) {
            for (int j = i; j <= n - 3; j += 2) {
                if (formula.charAt(i - 1) == '*' && formula.charAt(j + 1) == '*') {
                    tmp = solve(i, j);
                    long mid_val = tmp.first + tmp.second;

                    Pair<Long, Long> left = solve(0, i - 2);
                    long processed = left.first;
                    long in_process = left.second * mid_val;

                    int k = j + 2;
                    while (k < n) {
                        if (formula.charAt(k - 1) == '*') {
                            in_process *= (formula.charAt(k) - '0');
                        }
                        else {
                            processed += in_process;
                            in_process = formula.charAt(k) - '0';
                        }
                        k += 2;
                    }

                    ans = Math.max(ans, in_process + processed);
                }
            }
        }

        io.writeln(ans);
    }

    private Pair<Long, Long> solve(int i, int j) {
        long processed = 0;
        long in_process = formula.charAt(i) - '0';
        i += 2;

        while (i <= j) {
            if (formula.charAt(i - 1) == '*') {
                in_process *= (formula.charAt(i) - '0');
            }
            else {
                processed += in_process;
                in_process = formula.charAt(i) - '0';
            }
            i += 2;
        }

        return new Pair<Long, Long>(processed, in_process);
    }
}

class Pair<A, B> {
    public A first;
    public B second;

    public Pair(A a, B b) {
        first = a;
        second = b;
    }
}

class IOUtils {
    public BufferedReader in;
    public PrintWriter out;
    StringTokenizer st = null;

    public IOUtils(InputStream inStream, OutputStream outStream) {
        in = new BufferedReader(new InputStreamReader(inStream));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outStream)));
    }

    private void read_input() throws Exception {
        while (st == null || !(st.hasMoreTokens())) {
            st = new StringTokenizer(in.readLine());
        }
    }

    public void close() throws Exception {
        out.flush();
        in.close();
        out.close();
    }

    public String read() throws Exception {
        read_input();
        return st.nextToken();
    }

    public int readInt() throws Exception {
        read_input();
        return Integer.parseInt(st.nextToken());
    }

    public long readLong() throws Exception {
        read_input();
        return Long.parseLong(st.nextToken());
    }

    public double readDouble() throws Exception {
        read_input();
        return Double.parseDouble(st.nextToken());
    }

    public void writeln(String i) throws Exception {
        out.println(i);
    }

    public void write(String i) throws Exception {
        out.print(i);
    }

    public void writeln() throws Exception {
        out.print("\n");
    }

    public void write(int i) throws Exception {
        out.print(i);
    }

    public void writeln(int i) throws Exception {
        out.println(i);
    }

    public void write(long i) throws Exception {
        out.print(i);
    }

    public void writeln(long i) throws Exception {
        out.println(i);
    }
}