#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>

using namespace std;

typedef vector<long long int> VI;
typedef vector<vector<long long int> > VVI;
typedef vector<string> VS;
typedef pair<long long int, long long int> PII;
typedef pair<char, PII> PCI;
typedef pair<long long int, PII> PIII;

const long long int pri[13][3] = {{1, 1, 1},{1, 1, 2},{1, 2, 1},{2, 1, 1},{1, 2, 3},{1, 3, 2},{2, 1, 3},{2, 3, 1},{3, 1, 2},{3, 2, 1}, {2, 2, 1}, {2, 1, 2}, {1, 2, 2}};

long long int string_to_lli(string str); 
long long int check(char c); 
long long int rep_pri(char c, long long int i); 
long long int calc(long long int first, long long int second, char ope); 
long long int act(string str, long long int i); 


int main(void) {
    string str;
    cin >> str;

    long long int max_res;
    for (long long int i = 0; i < 13; i++) {
        long long int ans = act(str, i);
        if (i == 0) {
            max_res = ans; 
        } else {
            if (ans > max_res) {
                max_res = ans;
            }
        }
    }
    cout << max_res << endl;
    return 0;
}

// stringテ・ツ楪凝」ツつ値ong long intテ・ツ楪凝」ツ?ォテ・ツ、ツ嘉ヲツ渉?
long long int string_to_lli(string str) {
    long long int length = str.length();
    long long int number = 0;
    for (long long int i = 0; i < length; i++) {
        number += (long long int)(str[i] - '0');
        number *= 10;
    }
    number /= 10;
    return number;
}

long long int check(char c) {
    if (c >= '0' && c <= '9') {
        return 0;
    } else if (c == '+' || c == '-' || c == '*') {
        return 1;
    } else {
        return 2;
    }
}

long long int rep_pri(char c, long long int i) {
    if (c == '+') {
        return pri[i][0];
    } else if (c == '-') {
        return pri[i][1];
    } else if (c == '*') {
        return pri[i][2];
    } else {
        std::cerr << "ERROR_REP_PRI" << endl;
        return -1;
    }
}

long long int calc(long long int first, long long int second, char ope) {
    if (ope == '+') {
        return first + second;
    } else if (ope == '-') {
        return first - second;
    } else if (ope == '*') {
        return first * second;
    } else {
        std::cerr << "ERROR_CALC" << endl;
        return -1;
    }
}

long long int act(string str, long long int i) {
    long long int ans;
    long long int len = (long long int)str.length();
    stack<long long int> num;
    stack<char> ope;
    for (long long int j = 0; j < len; j++) {
        if (check(str[j]) == 0) {
            long long int start = j;
            long long int end = j;
            while (check(str[end]) == 0) {
                end++;
            }
            string sub = str.substr(start, end - start);
            num.push(string_to_lli(sub));
            j = end - 1;
            continue;
        } else if (check(str[j]) == 1) {
            if (ope.empty()) {
                ope.push(str[j]);
                continue;
            } else {
                char now = str[j];
                while ((!ope.empty()) && (rep_pri(ope.top(), i) >= rep_pri(now, i))) {
                    long long int second = num.top();
                    num.pop();
                    long long int first = num.top();
                    num.pop();
                    char old = ope.top();
                    ope.pop();
                    num.push(calc(first, second, old));
                }
                ope.push(now);
                continue;
            }
        } else if (str[j] == '(') {
            long long int start = j;
            int in = 1;
            int out = 0;
            while (in != out) {
                j++;
                if (str[j] == '(') {
                    in++;
                } else if (str[j] == ')') {
                    out++;
                }
            }
            long long int end = j;
            string sub = str.substr(start + 1, end - start - 1);
            num.push(act(sub, i));
        } else {
            std::cerr << "ERROR_ACT" << endl;
        }
    }

    while (!ope.empty()) {
        long long int second = num.top();
        num.pop();
        long long int first = num.top();
        num.pop();
        char ope_now = ope.top();
        ope.pop();
        num.push(calc(first, second, ope_now));
    }
    ans = num.top();
    return ans;
}

Measured memory_bytes: 3180