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

char cs[] = "+-*";
int pri[] = { 0, 0, 0 };

int it, n;
string s;

ll number();
ll fact();
ll expr(int);

ll number() {
	assert(isdigit(s[it]));
	ll res = 0;
	while (isdigit(s[it])) {
		res = res * 10 + (s[it++] - '0');
	}
	return res;
}

ll fact() {
	if (s[it] == '(') {
		it++;
		ll res = expr(2);
		assert(s[it] == ')');
		it++;
		return res;
	}
	return number();
}

ll expr(int p) {
	ll res = p ? expr(p - 1) : fact();
	while (true) {
		int id = -1;
		for (int i = 0; i < 3; i++) {
			if (it < n && pri[i] == p && s[it] == cs[i]) {
				id = i;
				break;
			}
		}
		if (id == -1) break;
		it++;
		ll tmp = p ? expr(p - 1) : fact();
		switch (cs[id])
		{
		case '+':
			res += tmp;
			break;
		case '-':
			res -= tmp;
			break;
		case '*':
			res *= tmp;
			break;
		default:
			break;
		}
	}
	return res;
}

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	cin >> s;
	n = s.size();
	ll res = LLONG_MIN;
	for (pri[0] = 0; pri[0] < 3; pri[0]++) {
		for (pri[1] = 0; pri[1] < 3; pri[1]++) {
			for (pri[2] = 0; pri[2] < 3; pri[2]++) {
				it = 0;
				ll val = expr(2);
				assert(it == n);
				res = max(res, val);
			}
		}
	}
	cout << res << endl;
	return 0;
}

