#include<iostream>
#include<vector>
#include<string>
#include<sstream>
#include<cstdlib>
using namespace std;

string O[27]={"111","112","113","121","122","123","131","132","133","211","212","213","221","222","223","231","232","233","311","312","313","321","322","323","331","332","333"};

string cal(vector<string> V,int in)
{  
  for(int i=0;i<V.size();i++){
    if(V[i]=="("){
      int l=1,r=0;
      vector<string> v;
      string s;
      V.erase(V.begin()+i);
      while(1){
	if(V[i]=="(")l++;
	if(V[i]==")")r++;
	v.push_back(V[i]);
	V.erase(V.begin()+i);	 
	if(r==l){
	  v.pop_back();
	  s=cal(v,in);
	  V.insert(V.begin()+i,s);
	  break;
	}
      }
    }
  }
  for(int k=1;k<=3;k++){
    for(int i=0;i<V.size();i++){
      if(V[i]=="+"){
	if((O[in][0]-'0')==k){
	  long long a=atoll(V[i-1].c_str())+atoll(V[i+1].c_str());
	  stringstream ss;
	  ss << a;
	  string S=ss.str();
	  V.erase(V.begin()+i+1);
	  V.erase(V.begin()+i);
	  V.erase(V.begin()+i-1);
	  V.insert(V.begin()+i-1,S);
	  i-=2;
	}
      }
      else if(V[i]=="-"){
	if((O[in][1]-'0')==k){
	  long long a=atoll(V[i-1].c_str())-atoll(V[i+1].c_str());
	  stringstream ss;
	  ss << a;
	  string S=ss.str();
	  V.erase(V.begin()+i+1);
	  V.erase(V.begin()+i);
	  V.erase(V.begin()+i-1);
	  V.insert(V.begin()+i-1,S);
	  i-=2;
	}
      }
      else if(V[i]=="*"){
	if((O[in][2]-'0')==k){
	  long long a=atoll(V[i-1].c_str())*atoll(V[i+1].c_str());
	  stringstream ss;
	  ss << a;
	  string S=ss.str();
	  V.erase(V.begin()+i+1);
	  V.erase(V.begin()+i);
	  V.erase(V.begin()+i-1);
	  V.insert(V.begin()+i-1,S);
	  i-=2;
	}
      }
    }
  }
  return V[0];
}
int main()
{
  string s,samp;
  long long ans=0;
  vector<string> V;
  cin>>s;
  for(int i=0;i<s.length();i++){
    if('0'<=s[i] && s[i]<='9'){
      samp+=s[i];
      if(i==s.length()-1)V.push_back(samp);
    }
    else {
      if(!samp.empty()){
	V.push_back(samp);
	samp="";
      }
      samp=s[i];
      V.push_back(samp);
      samp="";
    }
  }
  for(int i=0;i<27;i++){
    string a=cal(V,i);
    long long b=atoll(a.c_str());
    if(i==0)ans=b;
    else ans=max(b,ans);
  }
  cout<<ans<<endl;
  return 0;
}