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).
#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
const int maxx = 2005;
char s[maxn];
vector<int> vl, vr;
bool isnum(char a) { return a >= '0' && a <= '9'; }
long long num(char a) { return (long long)(a - '0'); }
long long solve(int l, int r) {
  if (r < l) return 0;
  long long ans = 0;
  for (int i = l; i <= r; i += 2) {
    if (isnum(s[i])) {
      if (s[i + 1] == '+' || i == r)
        ans += num(s[i]);
      else if (s[i + 1] == '*') {
        long long tmp = num(s[i]);
        i += 2;
        while (s[i - 1] == '*' && i <= r) {
          tmp *= num(s[i]);
          i += 2;
        }
        ans += tmp;
        i -= 2;
      }
    }
  }
  return ans;
}
int main() {
  long long w, m;
  while (~scanf("%s", s)) {
    int len = strlen(s);
    vl.clear();
    vr.clear();
    for (int i = 0; i < len; i++) {
      if (isnum(s[i])) {
        if (s[i + 1] == '+' && (i == 0 || s[i - 1] == '*')) vl.push_back(i);
        if (i && s[i - 1] == '+' && (i == len - 1 || s[i + 1] == '*'))
          vr.push_back(i);
      }
    }
    long long ans = solve(0, len - 1);
    for (int a = 0; a < vl.size(); a++) {
      for (int b = 0; b < vr.size(); b++) {
        int i = vl[a], j = vr[b];
        if (j < i) continue;
        long long tmp = solve(i, j);
        int ll = i, rr = j;
        while (ll - 1 >= 0 && s[ll - 1] == '*') {
          tmp *= num(s[ll - 2]);
          ll -= 2;
        }
        while (rr + 1 <= len - 1 && s[rr + 1] == '*') {
          tmp *= num(s[rr + 2]);
          rr += 2;
        }
        ans = max(ans, solve(0, ll - 2) + tmp + solve(rr + 2, len - 1));
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
