One day, Ikta, an elementary school student, received a piece of paper with mathematical formulas from his grandfather. Apparently, the grandfather will give you as much money as the answer to the formula. Ikta has only learned addition, subtraction, and multiplication, so only addition, subtraction, and multiplication are used in mathematical formulas. In normal calculation, multiplication must be calculated before addition and subtraction, but Ikta had a vague understanding of operator precedence, so for the time being, it is convenient to maximize the calculation result of the formula. I decided to consider a good priority.

Given the three binary operators + − × and a formula containing parentheses. Change the precedence of the three operators as you like and answer the calculation result when the formula is maximized.

However, note the following points.

* Operators are always left-associative. (Operators with the same precedence are always calculated from the left side of the formula.)
* Different operators may have the same precedence.
* Do not change the priority while calculating one formula.



Input

The input is given in the following format.
A formula consisting of numbers from 0 to 9 and the operators'+','-','*' and parentheses'(',')'


* To be precise, the input is in the format shown in BNF below.



> <expr> :: = (<expr>) | <number> | <expr> <op> <expr>
> <op> :: = + |-| *

<number> represents a non-negative integer.

Constraints

The input satisfies the following constraints.

* The formula is 200 characters or less.
* No matter what priority is set, it will not overflow as a result of calculation or in the middle of it as a 64-bit integer type.

Output

Output the maximum value obtained from the formula in one line.

Examples

Input

3-2*3


Output

3


Input

(5-3*4)*(0-2+1)


Output

21


Input

1-2+3-4+5-6*0


Output

3


Input

(1989967-3*1-211+4487)


Output

8511076028
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
using P = pair<int, int>;
using namespace std;

// 構文解析
using State = string::const_iterator;
class ParseError{};

ll number(State &begin);
ll term(State &begin, char op1, char op2, char op3);
ll term2(State &begin, char op1, char op2, char op3);
ll factor(State &begin, char op1, char op2, char op3);
ll expression(State &begin, char op1, char op2, char op3);
void consume(State &begin, char ch);

ll expression_two(State &begin, string op1, char op2);
ll term_two(State &begin, string op1, char op2);
ll factor_two(State &begin, string op1, char op2);

ll expression_two2(State &begin, char op1, string op2);
ll term_two2(State &begin, char op1, string op2);
ll factor_two2(State &begin, char op1, string op2);

ll expression_three(State &begin);
ll term_three(State &begin);
ll factor_three(State &begin);

ll expression_three(State &begin) {
    ll ret = factor_three(begin);

    for (;;) {
        if (*begin == '+') {
            ++begin;
            ret += factor_three(begin);
        }
        else if (*begin == '-') {
            ++begin;
            ret -= factor_three(begin);
        }
        else if (*begin == '*') {
            ++begin;
            ret *= factor_three(begin);
        }
        else {
            break;
        }
    }

    return ret;
}

ll factor_three(State &begin) {
    if (*begin == '(') {
        begin++; // '('を飛ばす
        ll ret = expression_three(begin);
        begin++;
        return ret;
    }
    else {
        return number(begin);
    }
}

// 数字の列をパースして，その数を返す
ll number(State &begin) {
    ll ret = 0;

    while (isdigit(*begin)) {
        ret *= 10LL;
        ret += *begin - '0';
        begin++;
    }

    return ret;
}


ll term(State  &begin, char op1, char op2, char op3) {
    ll ret = term2(begin, op1, op2, op3);

    for (;;) {
        if (*begin == op2) {
            begin++;
            if (op2 == '+') {
                ret += term2(begin, op1, op2, op3);
            }
            else if (op2 == '-') {
                ret -= term2(begin, op1, op2, op3);
            }
            else {
                ret *= term2(begin, op1, op2, op3);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

// 乗算除算の式をパースして，その評価結果を返す
ll term2(State &begin, char op1, char op2, char op3) {
    ll ret = factor(begin, op1, op2, op3);

    for (;;) {
        if (*begin == op3) {
            begin++;
            if (op3 == '+') {
                ret += factor(begin, op1, op2, op3);
            }
            else if (op3 == '-') {
                ret -= factor(begin, op1, op2, op3);
            }
            else {
                ret *= factor(begin, op1, op2, op3);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

ll factor(State &begin, char op1, char op2, char op3) {
    if (*begin == '(') {
        begin++; // '('を飛ばす
        ll ret = expression(begin, op1, op2, op3);
        begin++;
        return ret;
    }
    else {
        return number(begin);
    }
}


// 四則演算の式をパースして，その評価結果を返す
ll expression(State &begin, char op1, char op2, char op3) {
    ll ret = term(begin, op1, op2, op3);

    for (;;) {
        if (*begin == op1) {
            begin++;
            if (op1 == '+') {
                ret += term(begin, op1, op2, op3);
            }
            else if (op1 == '-') {
                ret -= term(begin, op1, op2, op3);
            }
            else {
                ret *= term(begin, op1, op2, op3);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

ll expression_two(State &begin, string op1, char op2) {
    ll ret = term_two(begin, op1, op2);

    for (;;) {
        if (*begin == op1[0]) {
            begin++;
            if (op1[0] == '+') {
                ret += term_two(begin, op1, op2);
            }
            else if (op1[0] == '-') {
                ret -= term_two(begin, op1, op2);
            }
            else {
                ret *= term_two(begin, op1, op2);
            }
        }
        else if (*begin == op1[1]) {
            begin++;
            if (op1[1] == '+') {
                ret += term_two(begin, op1, op2);
            }
            else if (op1[1] == '-') {
                ret -= term_two(begin, op1, op2);
            }
            else {
                ret *= term_two(begin, op1, op2);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

ll term_two(State &begin, string op1, char op2) {
    ll ret = factor_two(begin, op1, op2);

    for (;;) {
        if (*begin == op2) {
            begin++;
            if (op2 == '+') {
                ret += factor_two(begin, op1, op2);
            }
            else if (op2 == '-') {
                ret -= factor_two(begin, op1, op2);
            }
            else {
                ret *= factor_two(begin, op1, op2);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

ll factor_two(State &begin, string op1, char op2) {
    if (*begin == '(') {
        begin++; // '('を飛ばす
        ll ret = expression_two(begin, op1, op2);
        begin++;
        return ret;
    }
    else {
        return number(begin);
    }
}


ll expression_two2(State &begin, char op1, string op2) {
    ll ret = term_two2(begin, op1, op2);

    for (;;) {
        if (*begin == op1) {
            begin++;
            if (op1 == '+') {
                ret += term_two2(begin, op1, op2);
            }
            else if (op1 == '-') {
                ret -= term_two2(begin, op1, op2);
            }
            else {
                ret *= term_two2(begin, op1, op2);
            }
        }
        else {
            break;
        }
    }

    return ret;
}


ll term_two2(State &begin, char op1, string op2) {
    ll ret = factor_two2(begin, op1, op2);

    for (;;) {
        if (*begin == op2[0]) {
            begin++;
            if (op2[0] == '+') {
                ret += factor_two2(begin, op1, op2);
            }
            else if (op2[0] == '-') {
                ret -= factor_two2(begin, op1, op2);
            }
            else {
                ret *= factor_two2(begin, op1, op2);
            }
        }
        else if (*begin == op2[1]) {
            ++begin;
            if (op2[1] == '+') {
                ret += factor_two2(begin, op1, op2);
            }
            else if (op2[1] == '-') {
                ret -= factor_two2(begin, op1, op2);
            }
            else {
                ret *= factor_two2(begin, op1, op2);
            }
        }
        else {
            break;
        }
    }

    return ret;
}

ll factor_two2(State &begin, char op1, string op2) {
    if (*begin == '(') {
        begin++; // '('を飛ばす
        ll ret = expression_two2(begin, op1, op2);
        begin++;
        return ret;
    }
    else {
        return number(begin);
    }
}

void consume(State &begin, char expected) {
    if (*begin == expected) {
        begin++;
    }
    else {
        cerr << "Expected " << expected << " but got " << *begin << endl;
        cerr << "Rest string is ";
        while (*begin) {
            cerr << *begin++;
        }
        cerr << endl;
        throw ParseError();
    }
}

int main() {
    string s;
    getline(cin, s);

    // 1つだけ選択
    State begin = s.begin();
    ll ret = expression_three(begin);

    string tmp = "+-*";
    rep(i, 3) rep(j, 3) {
        if (i == j) continue;
        rep(k, 3) {
            if (i == k or j == k) continue;
            char op1 = tmp[i];
            char op2 = tmp[j];
            char op3 = tmp[k];
            State begin = s.begin();
            ll ans = expression(begin, op1, op2, op3);
            ret = max(ret, ans);
        }
    }
    //
    // 前に2つ選択
    rep(i, 3) rep(j, 3) {
        if (i == j) continue;
        rep(k, 3) {
            if (i == k or j == k) continue;
            char op1 = tmp[i];
            char op2 = tmp[j];
            char op3 = tmp[k];
            string OP1 = "" + string(1, op1) + string(1, op2);
            State begin = s.begin();
            ll ans = expression_two(begin, OP1, op3);
            ret = max(ret, ans);
        }
    }

    // 後ろに2つ
    rep(i, 3) rep(j, 3) {
        if (i == j) continue;
        rep(k, 3) {
            if (i == k or j == k) continue;
            char op1 = tmp[i];
            char op2 = tmp[j];
            char op3 = tmp[k];
            string OP2 = string(1, op2) + string(1, op3);
            State begin = s.begin();
            ll ans = expression_two2(begin, op1, OP2);
            ret = max(ret, ans);
        }
    }

    cout << ret << endl;
    return 0;
}

