#include<bits/stdc++.h>
using namespace std;

#define int long long

struct _1 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _2 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _3 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _4 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _5 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _6 {  
  int expr(string s, int& p) {
    int res = expr2(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= expr2(s, p);	
	continue;
      }
      break;
    }
    return res;     
  }
  int expr2(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += term(s, p);
	continue;
      }
      break;
    }
    return res;     
  }
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _7 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;	
	res += term(s, p);	
	continue;
      }
      if ( s[p] == '-' ) {
	p++;
	res -= term(s, p);	
	continue;
      }
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _8 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;	
	res += term(s, p);	
	continue;
      }
      if ( s[p] == '*' ) {
	p++;
	res *= term(s, p);	
	continue;
      }
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _9 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;	
	res -= term(s, p);	
	continue;
      }
      if ( s[p] == '*' ) {
	p++;
	res *= term(s, p);	
	continue;
      }
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _10 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;	
	res *= term(s, p);	
	continue;
      }      
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;	
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};


struct _11 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '-' ) {
	p++;	
	res -= term(s, p);	
	continue;
      }      
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      if ( s[p] == '*' ) {
	p++;
	res *= fact(s, p);
	continue;	
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _12 {  
  int expr(string s, int& p) {
    int res = term(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '+' ) {
	p++;	
	res += term(s, p);	
	continue;
      }      
      break;
    }
    return res;     
  } 
  int term(string s, int& p) {
    int res = fact(s, p);
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;
	res *= fact(s, p);
	continue;
      }
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;	
      }
      break;
    }
    return res;    
  }
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

struct _13 {  
  int expr(string s, int& p) {
    int res = fact(s, p);    
    while ( p < (int)s.size() ) {
      if ( s[p] == '*' ) {
	p++;	
	res *= fact(s, p);	
	continue;
      }
      if ( s[p] == '+' ) {
	p++;
	res += fact(s, p);
	continue;
      }
      if ( s[p] == '-' ) {
	p++;
	res -= fact(s, p);
	continue;	
      }
      break;
    }
    return res;     
  }  
  int fact(string s, int& p) {
    int res;
    if ( s[p] == '(' ) {
      p++;
      res = expr(s, p);
      p++;
    } else {
      res = numb(s, p);
    }
    return res;
  }
  
  int numb(string s, int& p) {    
    int res = 0;
    while ( p < (int)s.size() && isdigit(s[p]) ) {
      res = res*10+s[p++]-'0';      
    }
    return res;
  }   
};

signed main(){
  string s;
  cin >> s;

  _1 a;
  _2 b;
  _3 c;
  _4 d;
  _5 e;
  _6 f;
  _7 A;
  _8 B;
  _9 C;
  _10 D;
  _11 E;
  _12 F;
  _13 G;    

  int p = 0;
  int ans = a.expr(s, p);
  p = 0;
  ans = max(ans, b.expr(s, p));  
  p = 0;
  ans = max(ans, c.expr(s, p));  
  p = 0;
  ans = max(ans, d.expr(s, p));  
  p = 0;
  ans = max(ans, e.expr(s, p));  
  p = 0;
  ans = max(ans, f.expr(s, p));
  p = 0;
  ans = max(ans, A.expr(s, p));  
  p = 0;
  ans = max(ans, B.expr(s, p));  
  p = 0;
  ans = max(ans, C.expr(s, p));  
  p = 0;
  ans = max(ans, D.expr(s, p));  
  p = 0;
  ans = max(ans, E.expr(s, p));
  p = 0;
  ans = max(ans, F.expr(s, p));  
  p = 0;
  ans = max(ans, G.expr(s, p));  

  cout << ans << endl;
  
  return 0;
}


Measured memory_bytes: 3276