#include "bits/stdc++.h"
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2613&lang=jp
typedef long long ll;
using namespace std;
#define LINF 1LL<<63;
ll solve(string expr, map<char, ll>& op);
ll check(int& i, string& expr);

ll solve(string expr, map<char, ll>& op) {

	/* <expr> <op> <expr> ??? ( <expr> <op> <expr> )*/
	for (int p = 1; p <= 3;p++) {
		for (int i = 0; i < (int)expr.length();i++) {
			if (expr[i] >= '0' && expr[i] <= '9')continue;
			if (op[expr[i]] != p) continue;

			int parentheses = 0;
			for (int left = i - 1; left >= 0; left--) {
				if (left == 0) { expr = "(" + expr; i++; break; }
				if (expr[left] >= '0' && expr[left] <= '9')continue;
				if (expr[left] == ')') { parentheses++; }
				if (expr[left] == '(') { parentheses--; }
				if (parentheses > 0) continue;
				expr.insert(expr.begin() + left + 1, '('); i++; break;
			}
			parentheses = 0;
			for (int right = i + 1; right < expr.length();right++) {
				if (right == expr.length() - 1) { expr = expr + ")"; break; }
				if (expr[right] >= '0' && expr[right] <= '9')continue;
				if (expr[right] == '(') { parentheses++;}
				if (expr[right] == ')') { parentheses--;}
				if (parentheses > 0) continue;
				expr.insert(expr.begin() + right, ')'); break;
			}
		}
	}
	//cout << op['+'] << " " << op['-'] << " " << op['*'] << endl;
	//cout << expr << endl;
	int i = 0;
	ll ret = check(i, expr);
	//cout << ret << endl;
	return ret;
}

ll check(int& i, string& expr) {
	ll l_expr, r_expr;
	if (expr[i] == '(') {
		/* "( ~ )" op ~ */
		i++;
		l_expr = check(i, expr);
	}
	else {
		/* "number" op ~ */
		l_expr = 0;
		while (expr[i] >= '0' && expr[i] <= '9') {
			l_expr = l_expr * 10 + (expr[i] - '0');
			i++;
		}
	}
	/* (expr) or (number) */
	char option;
	if (i == expr.length() || expr[i] == ')') { i++; return l_expr; }
	else {
		option = expr[i];
		i++;
	}

	if (expr[i] == '(') {
		/* ~ op "( ~ )"*/
		i++;
		r_expr = check(i, expr);
	}
	else {
		/* ~ op "number" */
		r_expr = 0;
		while (expr[i] >= '0' && expr[i] <= '9') {
			r_expr = r_expr * 10 + (expr[i] - '0');
			i++;
		}
	}
	if (expr[i] == ')') {
		i++;
		if (option == '+') return l_expr + r_expr;
		if (option == '-') return l_expr - r_expr;
		if (option == '*') return l_expr * r_expr;
	}
	return 0;
}

int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	string expr; cin >> expr;
	map<char, ll> op; op['('] = op[')'] = 0;

	ll ans = -LINF;
	for (int i = 1; i <= 3;i++) {
		for (int j = 1; j <= 3;j++) {
			for (int k = 1; k <= 3;k++) {
				if (i != 1 && j != 1 && k != 1) continue;
				int x = 0;
				op['+'] = i; op['-'] = j; op['*'] = k;
				ans = max(ans, solve(expr, op));
			}
		}
	}
	cout << ans << endl;
}