#include<iostream>
#include<string>
#include<vector>
#include<cctype>
#include<algorithm>
using namespace std;
typedef long long ll;

const int add[13] = {1,1,2,1,2,2,1,1,1,2,3,2,3};
const int sub[13] = {1,1,2,2,1,1,2,2,3,1,1,3,2};
const int mul[13] = {1,2,1,1,2,1,2,3,2,3,2,1,1};

string s;

ll parse(int l, int r, int order){
  vector<ll> v;
  vector<char> op;
  for(int i=l;i<r;i++){
    if(s[i]=='('){
      int k = 1, start = i+1;
      while(k){
	i++;
	if(s[i]=='(')k++;
	else if(s[i]==')')k--;
      }
      v.push_back(parse(start,i,order));
    }else if(isdigit(s[i])){
      ll tmp = 0;
      while(isdigit(s[i])){
	tmp = tmp*10 + s[i]-'0';
	i++;
      }
      v.push_back(tmp);
      i--;
    }else{
      op.push_back(s[i]);
    }
  }
  /*
  for(int i=0;i<v.size();i++)cout << v[i] << " "; cout << endl;
  for(int j=0;j<op.size();j++)cout << op[j] << " "; cout << endl;
  */
  if(v.size()==0)return 0;

  for(int k=1;k<=3;k++){
    for(int i=0;i<op.size();i++){
      if(op[i] == '+' && add[order] == k){
	v[i] += v[i+1];
	v.erase(v.begin()+i+1);
	op.erase(op.begin()+i);
	i--;
      }
      if(op[i] == '-' && sub[order] == k){
	v[i] -= v[i+1];
	v.erase(v.begin()+i+1);
	op.erase(op.begin()+i);
	i--;
      }
      if(op[i] == '*' && mul[order] == k){
	v[i] *= v[i+1];
	v.erase(v.begin()+i+1);
	op.erase(op.begin()+i);
	i--;
      }
    }
  }
  return v[0];
}
     
int main(){
  cin >> s;
  
  ll res = parse(0,s.size(),0);
  for(int i=1;i<=12;i++)res = max(res,parse(0,s.size(),i));
  cout << res << endl;
}