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.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.StringTokenizer;

import javax.management.RuntimeErrorException;

public class Codeforces {

    StringTokenizer tok;
    BufferedReader in;
    PrintWriter out;

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

    void init() {
        try {
            if (OJ) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    String readString() {
        try {
            while (tok == null || !tok.hasMoreTokens()) {
                tok = new StringTokenizer(in.readLine());
            }
            return tok.nextToken();
        } catch (Throwable t) {
            throw new RuntimeException(t);
        }
    }

    int readInt() {
        return Integer.parseInt(readString());
    }

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

    void run() {
        init();
        solve();
        out.close();
    }
    
    long calc(char[] a, int first, int second) {
        long left = 0;
        long right = a[first + 1] - '0';
        for (int i=first+2;i<second;i+=2) {
            if (a[i] == '+') {
                left += right;
                right = a[i + 1] - '0';
            } else {
                right *= a[i + 1] - '0';
            }
        }
        
        long ins = left + right;
        
        left = 0;
        right = a[0] - '0';
        for (int i=1;i<first;i+=2) {
            if (a[i] == '+') {
                left += right;
                right = a[i + 1] - '0';
            } else {
                right *= a[i + 1] - '0';
            }
        }
        
        if (a[first] == '+') {
            left += right;
            right = ins;
        } else {
            right *= ins;
        }
        
        for (int i=second;i<a.length;i+=2) {
            if (a[i] == '+') {
                left += right;
                right = a[i + 1] - '0';
            } else {
                right *= a[i + 1] - '0';
            }
        }
        return left + right;
        
        
     }
    
    void solve() {
        char[] a = ("1*" + readString() + "*1").toCharArray();
        ArrayList<Integer> mults = new ArrayList<>();
        
        for (int i=0;i<a.length;i++) {
            if (a[i] == '*') mults.add(i);
        }
        
        long ans = 0;
        for (int i=0;i<mults.size();i++) {
            for (int j=i+1;j<mults.size();j++) {
                ans = Math.max(ans, calc(a, mults.get(i), mults.get(j)));
            }
        }
        out.println(ans);
        
        
    }

}