#include <bits/stdc++.h>
using namespace std;
vector<int> pos;
long long calc(const string &str) {
  stack<long long> num;
  stack<char> op;
  for (int i = 0, slen = str.length(); i < slen; ++i) {
    if (str[i] == ')') {
      while (op.top() != '(') {
        long long tmp = num.top();
        num.pop();
        if (op.top() == '*')
          num.top() *= tmp;
        else if (op.top() == '+')
          num.top() += tmp;
        op.pop();
      }
      op.pop();
      continue;
    }
    if (isdigit(str[i]))
      num.push(str[i] - '0');
    else if (str[i] == '+' && !op.empty() && op.top() == '*') {
      while (!op.empty() && op.top() == '*') {
        long long tmp = num.top();
        num.pop();
        num.top() *= tmp;
        op.pop();
      }
      op.push(str[i]);
    } else
      op.push(str[i]);
  }
  while (!op.empty()) {
    long long tmp = num.top();
    num.pop();
    if (op.top() == '*')
      num.top() *= tmp;
    else if (op.top() == '+')
      num.top() += tmp;
    op.pop();
  }
  return num.top();
}
int main() {
  string str;
  cin >> str;
  pos.push_back(-1);
  int slen = str.length();
  for (int i = 1; i < slen; i += 2)
    if (str[i] == '*') pos.push_back(i);
  pos.push_back(slen);
  slen = pos.size();
  long long ret = INT_MIN;
  for (int i(0); i <= (slen - 2); ++i)
    for (int j(i + 1); j <= (slen - 1); ++j) {
      string s = str;
      s.insert(pos[i] + 1, 1, '(');
      s.insert(pos[j] + 1, 1, ')');
      ret = max(ret, calc(s));
    }
  cout << ret << endl;
  return 0;
}
