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).
//package codeforces;

import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class E implements Closeable {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);
    StringTokenizer stringTokenizer;

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

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

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

    final int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    @SuppressWarnings("unchecked")
    void solve() throws IOException {
        final char[] s = ("+" + next() + "+").toCharArray();
        final long[] prefixSum = new long[s.length];
        for(int i = 2; i < s.length; i += 2) {
            if(s[i] == '+') {
                int prev = i - 2;
                while(s[prev] != '+') {
                    prev -= 2;
                }
                long product = 1;
                for(int j = prev + 1; j < i; j += 2) {
                    product *= s[j] - '0';
                }
                prefixSum[i] = prefixSum[prev] + product;
            }
        }
        class Utils {
            long calculate(int from, int to) {
                long bp = calculateInPar(from, to);
                while(s[from - 1] == '*') {
                    bp *= s[from - 2] - '0';
                    from -= 2;
                }
                while(s[to + 1] == '*') {
                    bp *= s[to + 2] - '0';
                    to += 2;
                }
                bp += prefixSum[from - 1];
                bp += prefixSum[s.length - 1] - prefixSum[to + 1];
                return bp;
            }

            long calculateInPar(int from, int to) {
                int fi = from + 1, ti = to - 1;
                while(fi <= ti && s[fi] == '*') {
                    fi += 2;
                }
                while(ti >= fi && s[ti] == '*') {
                    ti -= 2;
                }
                if(fi > ti) {
                    long product = 1;
                    for(int i = from; i <= to; i += 2) {
                        product *= s[i] - '0';
                    }
                    return product;
                }
                long betweenPluses = prefixSum[ti] - prefixSum[fi];
                long p1 = 1;
                for(int i = from; i < fi; i += 2) {
                    p1 *= s[i] - '0';
                }
                long p2 = 1;
                for(int i = to; i > ti; i -= 2) {
                    p2 *= s[i] - '0';
                }
                return betweenPluses + p1 + p2;
            }
        }
        long answer = prefixSum[s.length - 1];
        Utils utils = new Utils();
        for(int i = 0; i < s.length; i += 2) {
            if(s[i] == '*') {
                for(int j = i - 1; j > 0; j -= 2) {
                    answer = Math.max(answer, utils.calculate(j, i - 1));
                }
                for(int j = i + 1; j < s.length; j += 2) {
                    answer = Math.max(answer, utils.calculate(i + 1, j));
                }
            }
        }
        writer.println(answer);
    }

    public static void main(String[] args) throws IOException {
        try (E e = new E()) {
            e.solve();
        }
    }

    @Override
    public void close() throws IOException {
        reader.close();
        writer.close();
    }
}


