#include <iostream>
#include <queue>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <climits>
#include <cctype>

using namespace std;

#define REP(i,n) for(ll (i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define ALL(v) v.begin(),v.end()
#define Decimal fixed << setprecision(20)
#define SHOWP(x) cerr<<"["<<(x).FI<<", "<<(x).SE<<"]";
#define SHOWX(x) cerr<<#x<<": "<<x<<endl;
#define SHOWVEC(v, e) REP(i, e) cerr << (v[i]) << ' '; cerr << endl;
#define SHOW2D(a, h, w) REP(i, h){REP(j, w)cerr<<setw(3)<<(a[i][j])<<' ';cerr<<endl;}
constexpr int INF = 1100000000;
constexpr long long LLINF = 1100000000000000000LL;
constexpr long long MOD = 1000000007;

typedef long long ll;
typedef pair<ll, ll> P;
typedef string::const_iterator State;

vector<pair<ll, char>> func(vector<pair<ll, char>>& v, vector<char> op)
{
  vector<pair<ll, char>> ret;
  ret.PB(v[0]);
  for (int i = 1; i < v.size(); i += 2) {
    char opt = v[i].SE;
    ll num = v[i + 1].FI;
    if (find(ALL(op), opt) != op.end()) {
      if (opt == '+') ret.back().FI += num;
      else if (opt == '-') ret.back().FI -= num;
      else ret.back().FI *= num;
    } else {
      ret.PB(v[i]);
      ret.PB(v[i + 1]);
    }
  }
  return ret;
}

ll number(State& s)
{
  ll ret = 0;
  while (isdigit(*s)) {
    ret *= 10;
    ret += *s - '0';
    s++;
  }
  return ret;
}

ll expr1(State& s, vector<char>& op_list)
{
  s++;
  vector<pair<ll, char>> v;
  while (1) {
    //cout << "expr1: " << *s << endl;
    if (isdigit(*s)) {
      v.PB(MP(number(s), ' '));
    } else if (*s == '(') {
      v.PB(MP(expr1(s,op_list), ' '));
    } else if (*s == ')') {
      break;
    } else {
      v.PB(MP(-LLINF, *s));
      s++;
    }
  }
  s++;

  v = func(v, vector<char>{op_list[0]});
  v = func(v, vector<char>{op_list[1]});
  v = func(v, vector<char>{op_list[2]});

  return v[0].FI;
}
ll expr2(State& s, vector<char>& op_list)
{
  s++;
  vector<pair<ll, char>> v;
  while (1) {
    //cout << "expr2: " << *s << endl;
    if (isdigit(*s)) {
      v.PB(MP(number(s), ' '));
    } else if (*s == '(') {
      v.PB(MP(expr2(s,op_list), ' '));
    } else if (*s == ')') {
      break;
    } else {
      v.PB(MP(-LLINF, *s));
      s++;
    }
  }
  s++;

  v = func(v, vector<char>{op_list[0], op_list[1]});
  v = func(v, vector<char>{op_list[2]});

  return v[0].FI;
}
ll expr3(State& s, vector<char>& op_list)
{
  s++;
  vector<pair<ll, char>> v;
  while (1) {
    //cout << "expr3: " << *s << endl;
    if (isdigit(*s)) {
      v.PB(MP(number(s), ' '));
    } else if (*s == '(') {
      v.PB(MP(expr3(s,op_list), ' '));
    } else if (*s == ')') {
      break;
    } else {
      v.PB(MP(-LLINF, *s));
      s++;
    }
  }
  s++;

  v = func(v, vector<char>{op_list[0]});
  v = func(v, vector<char>{op_list[1], op_list[2]});

  return v[0].FI;
}

ll expr4(State& s, vector<char>& op_list)
{
  s++;
  vector<pair<ll, char>> v;
  while (1) {
    //cout << "expr4: " << *s << endl;
    if (isdigit(*s)) {
      v.PB(MP(number(s), ' '));
    } else if (*s == '(') {
      v.PB(MP(expr4(s,op_list), ' '));
    } else if (*s == ')') {
      break;
    } else {
      v.PB(MP(-LLINF, *s));
      s++;
    }
  }
  s++;

  v = func(v, op_list);

  return v[0].FI;
}

int main()
{
  string S;
  cin >> S;
  S = '(' + S + ')';
  vector<char> op_list = {'+', '-', '*'};
  sort(ALL(op_list));
  ll ans = LLONG_MIN;
  do {
    State begin = S.begin();
    ans = max(ans, expr1(begin, op_list));
    begin = S.begin();
    ans = max(ans, expr2(begin, op_list));
    begin = S.begin();
    ans = max(ans, expr3(begin, op_list));
    begin = S.begin();
    ans = max(ans, expr4(begin, op_list));
  } while(next_permutation(ALL(op_list)));
  cout << ans << endl;

  return 0;
}



Measured memory_bytes: 3212