#include <iostream>
#include <climits>
#include <string>
#include <cctype>
#include <set>
using namespace std;

set<char> aops[3];  // 演算子の優先順位

template<class T> struct Parser {
    typedef string::const_iterator State;

    T solve(const string &S) {
        State begin = S.begin();
        return expr(begin, 0);
    }

    T expr(State &begin, int depth) {
        if (depth == 3) return factor(begin);
        T ret = expr(begin, depth + 1);
        for (;;) {
            if (*begin == '+' && aops[depth].count('+')) {
                begin++;
                ret += expr(begin, depth + 1);
            } else if (*begin == '-' && aops[depth].count('-')) {
                begin++;
                ret -= expr(begin, depth + 1);
            } else if (*begin == '*' && aops[depth].count('*')) {
                begin++;
                ret *= expr(begin, depth + 1);
            } else {
                break;
            }
        }
        return ret;
    }

    T factor(State &begin) {
        if (*begin == '(') {
            begin++; // skip '('
            T ret = expr(begin, 0);
            begin++; // skip ')'
            return ret;
        } else {
            return number(begin);
        }
    }

    T number(State &begin) {
        T ret = 0;
        while (isdigit(*begin)) {
            ret *= 10;
            ret += *begin - '0';
            begin++;
        }
        return ret;
    }
};

int main() {
    string S; cin >> S;
    long long res = -LONG_MAX;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            for (int k = 0; k < 3; k++) {
                for (int it = 0; it < 3; it++) aops[it].clear();
                aops[i].insert('+');
                aops[j].insert('-');
                aops[k].insert('*');
                Parser<long long> ps;
                res = max(res, ps.solve(S));
            }
        }
    }
    cout << res << endl;
    return 0;
}
