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).
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package acmjava;

import static java.lang.Math.max;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Vector;
import java.util.List;
/**
 *
 * @author niuox
 */
public class Main {
    static long localmax(String str){
        long ans = 0;
        int len = str.length();
        List<Integer> list = new ArrayList<>();
        list.clear();
        for(int i=0;i<len;i++){
            if(str.charAt(i) == '*'){
                list.add(i);
            }
        }
        int s = list.size();
        if(s==0){
            long mid = 0;
            for(int j=0;j<len;j+=2){
                mid += (str.charAt(j) - '0');
            }
            return mid;
        }
        for(int _i=0;_i<s;_i++){
            int i = (int)list.get(_i) + 1;
            for(int j=i;j<len;j+=2){
                long mid = 0;
                long tmp = 1;
                for(int k=i;k<=j;k++){
                    if(str.charAt(k) >= '1' && str.charAt(k) <= '9'){
                        tmp *= (str.charAt(k) - '0');
                    }
                    else if(str.charAt(k) == '+'){
                        mid += tmp;
                        tmp = 1;
                    }
                }
                //pay attention to it 
                mid += tmp;
                int r = len;
                int l = 0;
                for(int k=j+1;k<len;k++){
                    if(str.charAt(k) >= '1' && str.charAt(k) <= '9'){
                        mid *= (str.charAt(k) - '0');
                    }
                    else if(str.charAt(k) == '+'){
                        r = k;
                        break;
                    }
                }
                for(int k=i-1;k>=0;k--){
                    if(str.charAt(k) >= '1' && str.charAt(k) <= '9'){
                        mid *= (str.charAt(k) - '0');
                    }
                    else if(str.charAt(k) == '+'){
                        l = k;
                        break;
                    }
                }
                boolean flag = false;
                tmp = 1;
                for(int k=0;k<l;k++){
                    flag = true;
                    if(str.charAt(k) >= '1' && str.charAt(k) <= '9'){
                        tmp *= (str.charAt(k) - '0');
                    }
                    else if(str.charAt(k) == '+'){
                        mid += tmp;
                        tmp = 1;
                    }
                }
                if(flag) mid += tmp;
                tmp = 1;
                flag = false;
                for(int k=r+1;k<len;k++){
                    flag = true;
                    if(str.charAt(k) >= '1' && str.charAt(k) <= '9'){
                        tmp *= (str.charAt(k) - '0');
                    }
                    else if(str.charAt(k) == '+'){
                        mid += tmp;
                        tmp = 1;
                    }
                }
                if(flag) mid += tmp;
                ans = max(ans,mid);
            }

        }
        return ans;
    }
    public static void main(String [] args){
        Scanner in = new Scanner(System.in);
        String str;
        
        //while( (str = in.next())!=null ){
        str = in.next();
        if(str.length()==1){
            System.out.println(str);
        }
        else{
            long ans1 = localmax(str);
            StringBuffer f =new StringBuffer();
            f.append(str);
            str = (f.reverse().toString());
            long ans2 = localmax(str);
            System.out.println(max(ans1,ans2));
        }
            
    }
}
