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.*;
import java.math.*;
import java.util.*;
import java.util.concurrent.*;

public class P552E {

  String equ = null;

  enum Type {
    NUMB, PLUS, MULT, LPAR, RPAR;
  }

  Type type(char c) {
    switch (c) {
      case '+' : return Type.PLUS;
      case '*' : return Type.MULT;
      case '(' : return Type.LPAR;
      case ')' : return Type.RPAR;
      default  : return Type.NUMB;
    }
  }

  BigInteger eval(int lp, int rp) {
    return eval(new StringBuffer(equ.substring(0, lp)).append("(").append(equ.substring(lp, rp))
                                                      .append(")").append(equ.substring(rp, equ.length())));
  }

  BigInteger eval(StringBuffer eq) {
//System.err.println(eq);
    ArrayDeque<Type> opers = new ArrayDeque<Type>();
    ArrayDeque<BigInteger> numbs = new ArrayDeque<BigInteger>();
    ArrayDeque<Type> oprStk = new ArrayDeque<Type>();
    ArrayDeque<BigInteger> numStk = new ArrayDeque<BigInteger>();
    
    for (char c : eq.toString().toCharArray()) {
      switch (type(c)) {
        case NUMB :
          numbs.add(BigInteger.valueOf(c - '0'));
          opers.add(Type.NUMB);
          break;
        case LPAR :
          oprStk.push(Type.LPAR);
          break;
        case RPAR :
          while (oprStk.peek() != Type.LPAR) {
            opers.add(oprStk.pop());
          }
          oprStk.pop();
          break;
        case PLUS :
          while ((oprStk.peek() == Type.PLUS) || (oprStk.peek() == Type.MULT)) {
            opers.add(oprStk.pop());
          }
          oprStk.push(Type.PLUS);
          break;
        case MULT :
          while ((oprStk.peek() == Type.MULT)) {
            opers.add(oprStk.pop());
          }
          oprStk.push(Type.MULT);
          break;
      }
    }

    while (oprStk.size() > 0) {
      opers.add(oprStk.pop());
    }

    for (Type oper : opers) {
      switch (oper) {
        case NUMB :
          numStk.push(numbs.pop());
          break;
        case PLUS :
          numStk.push(numStk.pop().add(numStk.pop()));
          break;
        case MULT :
          numStk.push(numStk.pop().multiply(numStk.pop()));
      }
    }

    return (numStk.pop());
  }

  @SuppressWarnings("unchecked")
  public void run() throws Exception {
    equ = next();
    
    if (equ.length() == 1) {
      println(equ);
      return;
    }

    ArrayList<Integer> mIdx = new ArrayList();
    mIdx.add(-1);
    for (int i = 1; i < equ.length(); i += 2) {
      if (equ.charAt(i) == '*') {
        mIdx.add(i);
      }
    }
    mIdx.add(equ.length());

    BigInteger maxValue = BigInteger.ZERO;
    
    for (int i = 0; i < mIdx.size(); i++) {
      for (int j = i + 1; j < mIdx.size(); j++) {
        if ((mIdx.get(j) - mIdx.get(i)) > 2) {
          maxValue = maxValue.max(eval(mIdx.get(i) + 1, mIdx.get(j)));
        }
      }
    }

    println(maxValue);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P552E().run();
    br.close();
    pw.close();
  }

  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }
}