// Template {{{
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(int)(n); ++i)
using namespace std;
typedef long long LL;

#ifdef LOCAL
#include "contest.h"
#else
#define dump(x) 
#endif

class range {
    struct Iterator {
        int val, inc;
        int operator*() {return val;}
        bool operator!=(Iterator& rhs) {return val < rhs.val;}
        void operator++() {val += inc;}
    };
    Iterator i, n;
    public:
    range(int e) : i({0, 1}), n({e, 1}) {}
    range(int b, int e) : i({b, 1}), n({e, 1}) {}
    range(int b, int e, int inc) : i({b, inc}), n({e, inc}) {}
    Iterator& begin() {return i;}
    Iterator& end() {return n;}
};

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
inline bool valid(int x, int w) { return 0 <= x && x < w; }

void iostream_init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.setf(ios::fixed);
    cout.precision(12);
}
//}}}

struct Result{
    int k;
    LL val;
};
string s;
map<char, int> ops;
Result expr(int k, int d) {
    // dump(k);
    // dump(d);
    if(d == 3) {
        if(s[k] == '(') {
            Result r = expr(k+1, 0);
            assert(s[r.k++] == ')');
            return r;
        } else if(isdigit(s[k])) {
            LL res = 0;
            while(k < s.size() && isdigit(s[k])) {
                res = res * 10 + s[k++] - '0';
            }
            return {k, res};
        } else {
            assert(false);
        }
    } else {
        Result r = expr(k, d+1);
        LL val = r.val;
        k = r.k;
        while(k < s.size()) {
            if(!(ops.count(s[k]) && ops[s[k]] == d)) {
                break;
            }
            Result p = expr(k+1, d+1);
            if(s[k] == '+') {
                val += p.val;
            } else if(s[k] == '-') {
                val -= p.val;
            } else if(s[k] == '*') {
                val *= p.val;
            }
            k = p.k;
        }
        return {k, val};
    }
}
int main(){
    iostream_init();
    while(cin >> s) {
        LL res = LLONG_MIN;
        REP(a, 3) REP(b, 3) REP(c, 3) {
            ops['+'] = a;
            ops['-'] = b;
            ops['*'] = c;
            res = max(res, expr(0, 0).val);
        }
        cout << res << endl;
    }
    return 0;
}

/* vim:set foldmethod=marker: */