#include <bits/stdc++.h>
using namespace std;
const int INF = (1LL << 30) - 1;
const long long int LINF = (1LL << 62) - 1;
long long int sol;
string S;
vector<int> star;
string::iterator p;
long long int eval(), term(), fact(), numb();
long long int eval() {
  long long int ans = term();
  while (*p == '+' || *p == '-') {
    if (*p == '+') {
      p++;
      ans += term();
    } else {
      p++;
      ans -= term();
    }
  }
  return ans;
}
long long int term() {
  long long int ans = fact();
  while (*p == '*' || *p == '/') {
    if (*p == '*') {
      p++;
      ans *= fact();
    } else {
      p++;
      ans /= fact();
    }
  }
  return ans;
}
long long int fact() {
  long long int ans;
  if (*p == '(') {
    p++;
    ans = eval();
    p++;
  } else
    ans = numb();
  return ans;
}
long long int numb() {
  long long int ans = 0;
  while (*p >= '0' && *p <= '9') {
    ans = ans * 10 + *p - '0';
    p++;
  }
  return ans;
}
int main() {
  int i, j, k;
  string T;
  cin.sync_with_stdio(false);
  cin >> S;
  S = "1*" + S + "*1";
  for (i = 0; i < (int)S.size(); i++)
    if (S[i] == '*') star.push_back(i);
  for (i = 0; i < (int)star.size(); i++)
    for (j = i + 1; j < (int)star.size(); j++) {
      T.resize(0);
      for (k = 0; k <= star[i]; k++) T.push_back(S[k]);
      T.push_back('(');
      for (; k < star[j]; k++) T.push_back(S[k]);
      T.push_back(')');
      for (; k < (int)S.size(); k++) T.push_back(S[k]);
      p = T.begin();
      sol = max(sol, eval());
    }
  printf("%lld\n", sol);
  return 0;
}
