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

public class E {

    private static abstract class Group {
        protected List<Integer> values = new ArrayList<Integer>();
        public long total;

        public void push(Integer val) {
            values.add(val);
        }

        public Integer pop() {
            return values.remove(values.size() - 1);
        }

        public abstract void prepare();

        @Override
        public String toString() {
            return values.toString();
        }

        public int size() {
            return values.size();
        }
    }

    private static class SGroup extends Group {

        @Override
        public void prepare() {
            for (Integer val : values) {
                total += val;
            }
        }

        @Override
        public String toString() {
            return "S" + super.toString();
        }
    }

    private static class MGroup extends Group {

        public long leftHead;
        public long leftTail;
        public long rightHead;
        public long rightTail;

        @Override
        public void prepare() {
            if (values.size() < 2) {
                throw new IllegalStateException("MGroup can't have less than 2 items");
            }
            total = 1;
            for (Integer val : values) {
                total *= val;
            }
            leftHead = values.get(0);
            leftTail = total / leftHead;
            rightHead = values.get(values.size() - 1);
            rightTail = total / rightHead;
        }

        @Override
        public String toString() {
            return "M" + super.toString();
        }
    }


    private static class Seq {
        private final List<Group> groups = new ArrayList<Group>();

        public Seq(String input) {

            List<Integer> values = new ArrayList<Integer>(input.length() / 2 + 1);
            List<Character> ops = new ArrayList<Character>(input.length() / 2);
            values.add(input.charAt(0) - '0');
            for (int i = 0; i < input.length() / 2; ++i) {
                ops.add(input.charAt(i * 2 + 1));
                values.add(input.charAt(i * 2 + 2) - '0');
            }

            parseGroups(values, ops);
            for (Group group : groups) {
                group.prepare();
            }
        }

        private void parseGroups(List<Integer> values, List<Character> ops) {
            if (ops.size() == 0) {
                SGroup group = new SGroup();
                group.push(values.get(0));
                groups.add(group);
                return;
            }

            Group currentGroup;
            Character prevOp = ops.get(0);
            if (prevOp == '*') {
                currentGroup = new MGroup();
            } else {
                currentGroup = new SGroup();
            }
            currentGroup.push(values.get(0));
            for (int i = 0; i < ops.size(); ++i) {
                Character op = ops.get(i);
                Integer val = values.get(i + 1);
                if (op != prevOp) {
                    if (op == '*') {
                        Integer lastVal = currentGroup.pop();
                        if (currentGroup.size() != 0) {
                            groups.add(currentGroup);
                        }
                        currentGroup = new MGroup();
                        currentGroup.push(lastVal);
                        currentGroup.push(val);
                    } else {
                        groups.add(currentGroup);
                        currentGroup = new SGroup();
                        currentGroup.push(val);
                    }
                    prevOp = op;
                } else {
                    currentGroup.push(val);
                }
            }
            groups.add(currentGroup);
        }

        public long getMax() {
            ArrayList<Integer> mGroupIndices = new ArrayList<Integer>();
            mGroupIndices.add(-1);
            for (int i = 0; i < groups.size(); ++i) {
                if (groups.get(i) instanceof MGroup) {
                    mGroupIndices.add(i);
                }
            }
            long max = eval();
            if (mGroupIndices.size() == 1) {
                return max;
            }
            mGroupIndices.add(groups.size());
            for (int i = 0; i < mGroupIndices.size(); ++i) {
                for (int j = i + 1; j < mGroupIndices.size(); ++j) {
                    int leftGroup = mGroupIndices.get(i);
                    int rightGroup = mGroupIndices.get(j);
                    long candidate = eval(leftGroup, rightGroup);
                    max = candidate > max ? candidate : max;
                }
            }
            return max;
        }

        private long eval() {
            long result = 0;
            for (Group group : groups) {
                result += group.total;
            }
            return result;
        }

        private long eval(int leftGroup, int rightGroup) {
            long result = 0;
            long middle = 0;
            long multiplier = 1;
            for (int i = 0; i < groups.size(); ++i) {
                Group group = groups.get(i);
                if (i < leftGroup || i > rightGroup) {
                    result += group.total;
                }
                if (i == leftGroup) {
                    MGroup mGroup = (MGroup) group;
                    multiplier = mGroup.rightTail;
                    middle += mGroup.rightHead;
                } else if (i == rightGroup) {
                    MGroup mGroup = (MGroup) group;
                    middle += mGroup.leftHead;
                    multiplier *= mGroup.leftTail;
                } else if (i > leftGroup && i < rightGroup) {
                    middle += group.total;
                }
            }
            return result + middle * multiplier;
        }
    }

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String input = s.nextLine();
        Seq seq = new Seq(input);
        System.out.println(seq.getMax());
    }
}
