/*
 * 2613.cc: Unordered Operators
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int ON = 3;

typedef long long ll;
const ll LMINF = 1LL << 63;

/* typedef */

/* global variables */

int prs[ON];

/* subroutines */

int op_pr(char c) {
  switch (c) {
  case '*': return prs[0];
  case '+': return prs[1];
  case '-': return prs[2];
  }
  return -1;
}

ll num(string &s, int &pos) {
  ll n = 0;
  while (pos < s.size() && s[pos] >= '0' && s[pos] <= '9')
    n = n * 10 + s[pos++] - '0';
  return n;
}

ll expr(string &s, int &pos, int p = 0) {
  if (p >= ON) {
    if (s[pos] == '(') {
      pos++; // '('
      ll e = expr(s, pos, 0);
      pos++; // ')'
      return e;
    }

    return num(s, pos);
  }

  ll e0 = expr(s, pos, p + 1);
  while (pos < s.size() && op_pr(s[pos]) == p) {
    char op = s[pos++]; // '*', '+', '-'
    ll e1 = expr(s, pos, p + 1);

    switch (op) {
    case '*': e0 *= e1; break;
    case '+': e0 += e1; break;
    case '-': e0 -= e1; break;
    }
  }

  return e0;
}

/* main */

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

  ll maxe = LMINF;

  for (;;) {
    int pos = 0;
    ll e = expr(s, pos);
    if (maxe < e) maxe = e;

    int k = 0;
    while (k < ON) {
      if (++prs[k] < ON) break;
      prs[k++] = 0;
    }
    if (k >= ON) break;
  }

  printf("%lld\n", maxe);
  return 0;
}