#include <bits/stdc++.h>   using namespace std;   string s;   stack<long long> num;   stack<char> fuhao;   vector<int> pos;   void calc() {     char cc = fuhao.top();     fuhao.pop();     long long a = num.top();     num.pop();     long long b = num.top();     num.pop();     long long ans;     if (cc ==  * )       ans = a * b;     else       ans = a + b;     num.push(ans);   }   long long solve(string p) {     int len = p.length();     for (int i = 0; i < len; i++) {       if (p[i] >=  0  && p[i] <=  9 ) {         num.push(p[i] -  0 );       } else if (p[i] ==  ( ) {         fuhao.push(p[i]);       } else if (p[i] ==  ) ) {         while (fuhao.top() !=  ( ) calc();         fuhao.pop();       } else if (p[i] ==  * ) {         fuhao.push(p[i]);       } else if (p[i] ==  + ) {         while (!fuhao.empty() && fuhao.top() ==  * ) {           calc();         }         fuhao.push(p[i]);       }     }     while (!fuhao.empty()) calc();     long long ans = num.top();     return ans;   }   int main() {     cin >> s;     int len = s.length();     pos.push_back(-1);     for (int i = 1; i < len; i += 2)       if (s[i] ==  * ) pos.push_back(i);     pos.push_back(len);     long long ans = 0;     for (int i = 0; i < pos.size() - 1; i++) {       for (int j = i + 1; j < pos.size(); j++) {         string temp = s;         temp.insert(pos[i] + 1, 1,  ( );         temp.insert(pos[j] + 1, 1,  ) );         ans = max(ans, solve(temp));       }     }     cout << ans << endl;     return 0;   }   