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;
string s;
int n;
long long fun(int l, int r) {
  long long sum = 0, tmp = 1;
  int i;
  for (i = l; i <= r; i++) {
    if (s[i] >= '0' && s[i] <= '9')
      tmp *= (s[i] - '0');
    else if (s[i] == '+') {
      sum += tmp;
      tmp = 1;
    }
  }
  sum += tmp;
  tmp = 1;
  long long ans = 0;
  for (i = 0; i < n; i++) {
    if (i == l) {
      tmp *= sum;
      i = r;
    } else {
      if (s[i] >= '0' && s[i] <= '9')
        tmp *= s[i] - '0';
      else if (s[i] == '+') {
        ans += tmp;
        tmp = 1;
      }
    }
  }
  ans += tmp;
  return ans;
}
int main() {
  cin >> s;
  n = s.size();
  int a[50];
  int j = 0, i, k;
  memset(a, 0, sizeof(a));
  a[j++] = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '*') a[j++] = i - 1, a[j++] = i + 1;
  }
  a[j++] = n;
  long long ans = 0;
  for (i = 0; i < j; i++) {
    for (k = i; k < j; k++) {
      ans = max(ans, fun(a[i], a[k]));
    }
  }
  cout << ans << endl;
  return 0;
}
