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).
/**
 * @author derrick20
 */

import java.io.*;
import java.util.*;

public class VanyaAndBrackets {
    public static void main(String[] args) throws Exception {
        FastScanner sc = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

//        generate();
        orig = sc.next();
        ArrayList<Integer> stars = new ArrayList<>();
        stars.add(-1);
        for (int i = 1; i < orig.length(); i += 2) {
            if (orig.charAt(i) == '*') {
                stars.add(i);
            }
        }
        stars.add(orig.length());
//        long start = System.currentTimeMillis();
        long max = eval(0, orig.length() - 1, 0, 0, -1);
        for (int ptr = 0; ptr < stars.size(); ptr++) {
            int i = stars.get(ptr);
            for (int ptr2 = ptr + 1; ptr2 < stars.size(); ptr2++) {
                int j = stars.get(ptr2);
                // from after a given * to a current star.
                long val = eval(i + 1, j - 1, 0, 0, -1);
//                        String res = orig.substring(0, i + 1).concat(Long.toString(val)).concat(orig.substring(j + 1));
                long ans = eval(0, i, j, orig.length() - 1, val);
                max = Math.max(max, ans);
            }
        }
        /*
        for (int i = 1; i < orig.length(); i += 2) {
            if (orig.charAt(i) == '*') {
                for (int j = 0; j < orig.length(); j += 2) {
                    long ans = 0;
                    if (j < i) {
//                        String mid = orig.substring(j, i);
                        long val = eval(j, i - 1, 0, 0, - 1);
//                        String res = orig.substring(0, j).concat(Long.toString(val)).concat(orig.substring(i));
                        ans = eval(0, j - 1, i, orig.length() - 1, val);
                    }
                    else {
//                        String mid = orig.substring(i + 1, j + 1);
                        long val = eval(i + 1, j, 0, 0, -1);
//                        String res = orig.substring(0, i + 1).concat(Long.toString(val)).concat(orig.substring(j + 1));
                        ans = eval(0, i, j + 1, orig.length() - 1, val);
                    }
                    max = Math.max(max, ans);
                }
            }
        }
        // */
        out.println(max);
//        out.println((System.currentTimeMillis() - start) / 1000.0);
        out.close();
    }

    static String orig;

    static void generate() {
        StringBuilder sb = new StringBuilder();
        int ct = 0;
        for (int i = 0; i <= 5000; i++) {
            if (i % 2 == 0) {
                sb.append((int) (Math.random() * 9) + 1);
            }
            else {
                if (ct < 15) {
                    char op = (Math.random() < 0.7) ? '*' : '+';
                    if (op == '*') {
                        ct++;
                    }
                    sb.append(op);
                }
                else {
                    sb.append('+');
                }
            }
        }
        System.out.println(sb);
    }

    static long eval(int l1, int r1, int l2, int r2, long midVal) {
        ArrayDeque<Long> nums = new ArrayDeque<>();
        ArrayDeque<Character> ops = new ArrayDeque<>();
        int i = l1;
        while (i <= r1) {
            char c = orig.charAt(i);
            if (Character.isDigit(c)) {
                long x = Character.getNumericValue(c);
                while (i + 1 <= r1 && Character.isDigit(orig.charAt(i + 1))){
                    x *= 10;
                    x += Character.getNumericValue(orig.charAt(i + 1));
                    i++;
                }
                nums.addLast(x);
            }
            else {
                if (ops.size() > 0) {
                    while (ops.size() > 0 && c == '+' && ops.getLast() == '*') {
                        long ult = nums.pollLast();
                        long penult = nums.pollLast();
                        nums.addLast(ult * penult);
                        ops.pollLast();
                    }
                }
                ops.addLast(c);
            }
            i++;
        }
        if (midVal != -1) {
            nums.addLast(midVal);
            i = l2;
            while (i <= r2) {
                char c = orig.charAt(i);
                if (Character.isDigit(c)) {
                    long x = Character.getNumericValue(c);
                    while (i + 1 <= r2 && Character.isDigit(orig.charAt(i + 1))){
                        x *= 10;
                        x += Character.getNumericValue(orig.charAt(i + 1));
                        i++;
                    }
                    nums.addLast(x);
                }
                else {
                    if (ops.size() > 0) {
                        while (ops.size() > 0 && c == '+' && ops.getLast() == '*') {
                            long ult = nums.pollLast();
                            long penult = nums.pollLast();
                            nums.addLast(ult * penult);
                            ops.pollLast();
                        }
                    }
                    ops.addLast(c);
                }
                i++;
            }
        }
        while (ops.size() > 0) {
            ASSERT(nums.size() >= 2, "Invalid!");
            long ult = nums.pollLast();
            long penult = nums.pollLast();
            char op = ops.pollLast();
            nums.addLast(op == '*' ? ult * penult : ult + penult);
        }
        ASSERT(nums.size() == 1, "Didn't finish!");
        return nums.getLast();
    }

    static class FastScanner {
        private int BS = 1 << 16;
        private char NC = (char) 0;
        private byte[] buf = new byte[BS];
        private int bId = 0, size = 0;
        private char c = NC;
        private double cnt = 1;
        private BufferedInputStream in;

        public FastScanner() {
            in = new BufferedInputStream(System.in, BS);
        }

        public FastScanner(String s) {
            try {
                in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
            } catch (Exception e) {
                in = new BufferedInputStream(System.in, BS);
            }
        }

        private char getChar() {
            while (bId == size) {
                try {
                    size = in.read(buf);
                } catch (Exception e) {
                    return NC;
                }
                if (size == -1) return NC;
                bId = 0;
            }
            return (char) buf[bId++];
        }

        public int nextInt() {
            return (int) nextLong();
        }

        public int[] nextInts(int N) {
            int[] res = new int[N];
            for (int i = 0; i < N; i++) {
                res[i] = (int) nextLong();
            }
            return res;
        }

        public long[] nextLongs(int N) {
            long[] res = new long[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextLong();
            }
            return res;
        }

        public long nextLong() {
            cnt = 1;
            boolean neg = false;
            if (c == NC) c = getChar();
            for (; (c < '0' || c > '9'); c = getChar()) {
                if (c == '-') neg = true;
            }
            long res = 0;
            for (; c >= '0' && c <= '9'; c = getChar()) {
                res = (res << 3) + (res << 1) + c - '0';
                cnt *= 10;
            }
            return neg ? -res : res;
        }

        public double nextDouble() {
            double cur = nextLong();
            return c != '.' ? cur : cur + nextLong() / cnt;
        }

        public double[] nextDoubles(int N) {
            double[] res = new double[N];
            for (int i = 0; i < N; i++) {
                res[i] = nextDouble();
            }
            return res;
        }

        public String next() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c > 32) {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public String nextLine() {
            StringBuilder res = new StringBuilder();
            while (c <= 32) c = getChar();
            while (c != '\n') {
                res.append(c);
                c = getChar();
            }
            return res.toString();
        }

        public boolean hasNext() {
            if (c > 32) return true;
            while (true) {
                c = getChar();
                if (c == NC) return false;
                else if (c > 32) return true;
            }
        }
    }

    static void ASSERT(boolean assertion, String message) {
        if (!assertion) throw new AssertionError(message);
    }
}