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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

public class E implements Runnable {

    final static boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    final static String fileName = "";

    void init() throws IOException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            if (fileName.isEmpty()) {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                in = new BufferedReader(new FileReader(fileName + ".in"));
                out = new PrintWriter(fileName + ".out");
            }
        }
    }

    public static void main(String[] args) {
        new E().run();
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws NumberFormatException, IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws NumberFormatException, IOException {
        return Long.parseLong(readString());
    }

    int[] readIntArray(int size) throws NumberFormatException, IOException {
        int[] arr = new int[size];
        for (int i = 0; i < size; i++) {
            arr[i] = readInt();
        }
        return arr;
    }

    static long timeIn;

    void time() {
        System.err.println("Time = " + (System.currentTimeMillis() - timeIn));
    }

    @Override
    public void run() {
        try {
            timeIn = System.currentTimeMillis();
            init();
            solve();
            out.close();
            time();
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    private static final int INF = Integer.MAX_VALUE;

    private long compute(char[] s, int start, int finish, int x, int y) {
        long total = 0;
        long current = s[start] - '0';
        for (int i = start + 1; i <= finish; i += 2) {
            if (s[i] == '+') {
                total += current;
                current = s[i + 1] - '0';
            } else {
                if (i == x) {
                    current *= compute(s, x + 1, y - 1, -1, -1);
                    i = y;
                }
                current *= s[i + 1] - '0';
            }
        }
        total += current;
        return total;
    }

    private void solve() throws IllegalArgumentException, IOException {

        char[] s = ("1*" + readString() + "*1").toCharArray();
        List<Integer> stars = new ArrayList<Integer>();
        int n = s.length;

        for (int i = 0; i < n; i++) {
            if (s[i] == '*') {
                stars.add(i);
            }
        }

        long answer = Long.MIN_VALUE;
        
        for (int x : stars) {
            for (int y : stars) {
                if (y <= x)
                    continue;
                answer = Math.max(answer, compute(s, 0, n - 1, x, y));
            }
        }
        
        out.println(answer);
    }
}
