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).

// Problem : E. Vanya and Brackets
// Contest : Codeforces Round #308 (Div. 2)
// URL : https://codeforces.com/contest/552/problem/E
// Memory Limit : 256 MB
// Time Limit : 1000 ms
// Powered by CP Editor (https://github.com/cpeditor/cp-editor)

import java.io.*;
import java.util.*;
import java.util.regex.*;
import javax.script.*;

public class a {
    public static void main(String[] args) throws IOException {
        FastReader scan = new FastReader();
        //PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("taming.out")));
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        Task solver = new Task();
        //int t = scan.nextInt();
        int t = 1;
        for(int i = 1; i <= t; i++) solver.solve(i, scan, out);
        out.close();
    }
    static class Task {
        public void solve(int testNumber, FastReader sc, PrintWriter pw) {
        	String str = sc.nextLine();
        	ArrayList<Integer> pos = new ArrayList<Integer>();
        	pos.add(-1);
        	for(int i=0;i<str.length();i++){
        		if(str.charAt(i)=='*'){
        			pos.add(i);
        		}
        	}
        	pos.add(str.length());
        	long max = 0;
        	for(int i=0;i<pos.size();i++){
        		for(int j=i+1;j<pos.size();j++){
        			String t=str.substring(0,Math.max(0,pos.get(i)+1));
        			
        			String tt=(str.substring(Math.max(0,pos.get(i)+1),pos.get(j)));
        			String ttt=(str.substring(pos.get(j)));
        			ArrayList<String> str2 = new ArrayList(Arrays.asList(tt.split("")));
        			ArrayList<String> f = new ArrayList(Arrays.asList(t.split("")));
        			f.add(""+find(str2));
        			f.addAll(new ArrayList(Arrays.asList(ttt.split(""))));
        			f.remove("");
        			f.remove("");
        			f.remove("");
        		//	pw.println(f);
        		//	pw.println(find(f));
        			max = Math.max(find(f),max);
        		//	pw.println(exp);
        		}
        	}
        	pw.println(max);
        }
        public long find(ArrayList<String> a){
        	if(a.size()==0){
        		return 1;
        	}
			long[] n = new long[a.size()/2+1];
			ArrayList<Integer> pos = new ArrayList<Integer>();
        	
			for(int i=0;i<a.size();i++){
				if(i%2==0){
					n[i/2]=Long.parseLong(a.get(i));
					
				}
				else if(a.get(i).charAt(0)=='*'){
					pos.add(i/2);
				}
			}
			for(int x : pos){
				n[x+1]=n[x+1]*n[x];
				n[x]=0;
			}
			long sum =0;
			for(int i=0;i<a.size()/2+1;i++){
				sum+=n[i];
			}
			return sum;
		}

    }
    static class tup implements Comparable<tup>{
        int a, b,c;
        tup(){};
        tup(int a, int b, int c){
            this.a=a;
            this.b=b;
            this.c=c;
        }

        @Override
        public int compareTo( tup o2) {
            return o2.b!=b?Integer.compare(o2.b,b):Integer.compare(o2.a,a);
        }
    }
    static void shuffle(long[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            long temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    }
    static void shuffle(int[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(new File(s)));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}