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.*;
import java.io.*;

public class E
{
   public static void main(String[] args)
   {
      PrintWriter out = new PrintWriter(System.out);
      new E(new FastScanner(), out);
      out.close();
   }

   int tokenPtr;
   long nextToken(String s)
   {
      char c = s.charAt(tokenPtr++);
      if (c == '*') return -2;
      if (c == '+') return -1;

      long val = (int)(c-'0');
      while (tokenPtr < s.length() && Character.isDigit(s.charAt(tokenPtr)))
      {
         c = s.charAt(tokenPtr++);
         val *= 10;
         val += (int)(c-'0');
      }
      return val;
   }

   long calculate(String s)
   {
      //System.out.println(s);
      tokenPtr = 0;
      ArrayDeque<Long> stk = new ArrayDeque<>();
      while (tokenPtr < s.length())
      {
         long v = nextToken(s);
         if (v == -2)
         {
            v = nextToken(s);
            v *= stk.pop();
            stk.push(v);
         }
         else if (v > 0)
         {
            stk.push(v);
         }
      }
      long res = 0;
      for (long v : stk)
         res += v;
      return res;
   }

   public E(FastScanner in, PrintWriter out)
   {
      String s = in.next();
      long res = calculate(s);

      for (int i=0; i<s.length(); i++)
      {
         if (s.charAt(i) == '*')
         {
            for (int j=i+1; j<s.length(); j++)
            {
               if (s.charAt(j) == '*')
               {
                  long val = calculate(s.substring(i+1, j));
                  String ss = s.substring(0, i+1)+val+s.substring(j);
                  long rr = calculate(ss);
                  res = Math.max(res, rr);
               }
            }
            long val = calculate(s.substring(i+1));
            String ss = s.substring(0, i+1)+val;
            long rr = calculate(ss);
            res = Math.max(res, rr);
         
            val = calculate(s.substring(0, i));
            ss = val+s.substring(i);
            rr = calculate(ss);
            res = Math.max(res, rr);
         }
      }

      out.println(res);
   }
}

class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    
    public FastScanner()
    {
        stream = System.in;
    }
    
    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    
    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }
    
    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }
    
    int nextInt()
    {
        return Integer.parseInt(next());
    }
    
    long nextLong()
    {
        return Long.parseLong(next());
    }
    
    double nextDouble()
    {
        return Double.parseDouble(next());
    }
    
    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }
    
    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
}
