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.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Problem552E {
  private static long calc(String expression, int left, int right) {
    long w = eval(expression.substring(left, right + 1));
    String compacted = "";
    if (left > 0) {
      compacted = compacted + expression.substring(0, left);
    }
    compacted += w;
    if (right < expression.length() - 1) {
      compacted += expression.substring(right + 1, expression.length());
    }
    return eval(compacted);
  }
  
  private static void check(boolean b) {
    if (!b) {
      throw new Error();
    }
  }

  private static class Stream {
    public Stream(String source) {
      this.source = source;
    }
    
    public char get() {
      return source.charAt(index);
    }
    
    public boolean done() {
      return index == source.length();
    }
    
    public void advance() {
      ++index;
    }
    
    private String source;
    private int index;
  }
  
  private static int getDigit(Stream s) {
    int result = s.get() - '0';
    s.advance();
    return result;
  }
  
  private static long getNumber(Stream s) {
    int result = getDigit(s);
    while (!s.done() && '0' <= s.get() && s.get() <= '9') {
      result = 10 * result + getDigit(s);
    }
    return result;
  }
  
  private static long getProduct(Stream s) {
    long p = getNumber(s);
    while (!s.done() && s.get() != '+') {
      check(s.get() == '*');
      s.advance();
      p = p * getNumber(s);
    }
    return p;
  }
  
  private static long eval(Stream s) {
    long answer = getProduct(s);
    while (!s.done()) {
      check(s.get() == '+');
      s.advance();
      answer += getProduct(s);
    }
    return answer;
  }

  private static long eval(String s) {
    return eval(new Stream(s));
  }
  
  public static void main(String[] args) {
    Scanner in = new Scanner(new InputStreamReader(System.in));
    String expression = in.nextLine().trim();
    List<Integer> positions = new ArrayList<>();
    positions.add(0);
    positions.add(expression.length() - 1);
    for (int i = 0; i < expression.length(); i++) {
      if (expression.charAt(i) == '*') {
        positions.add(i - 1);
        positions.add(i - 3);
        positions.add(i + 1);
        positions.add(i + 3);
      }
    }
    long answer = 0;
    for (int left : positions) {
      if (left < 0 || left >= expression.length()) {
        continue;
      }
      for (int right : positions) {
        if (right < 0 || right >= expression.length() || right < left) {
          continue;
        }
        long cur = calc(expression, left, right);
        answer = Math.max(answer, cur);
      }
    }
    System.out.println(answer); 
  }
}

