#include<bits/stdc++.h>
using namespace std;
typedef long long int64;
const string temp = "+-*";

string S;
int level[256];

bool inc(int depth, char c)
{
  return(temp.find(c) != string::npos && level[c] == depth);
}

int64 F(int& idx, int depth)
{
  int64 val;
  if(depth == 3) {
    if(isdigit(S[idx])) {
      val = 0;
      while(idx < S.size() && isdigit(S[idx])) {
        val = val * 10 + S[idx++] - '0';
      }
    } else {
      ++idx;
      val = F(idx, 0);
      ++idx;
    }
  } else {
    val = F(idx, depth + 1);
    while(idx < S.size() && inc(depth, S[idx])) {
      char op = S[idx++];
      int64 y = F(idx, depth + 1);
      if(op == '+') val += y;
      else if(op == '-') val -= y;
      else val *= y;
    }
  }
  return(val);
}


int main()
{ 
  cin >> S;
  int64 ret = LLONG_MIN;
  for(int& i = level['+'] = 0; i < 3; i++) {
    for(int& j = level['-'] = 0; j < 3; j++) {
      for(int& k = level['*'] = 0; k < 3; k++) {
        int idx = 0;
        ret = max(ret, F(idx, 0));
      }
    }
  }
  cout << ret << endl;
}