func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Polynom {     long long x, y;   } a[6001], b[6001];   int main() {     string s;     cin >> s;     if (s.length() == 1) {       cout << s << endl;       return 0;     }     for (int i = s.length(); i > 0; i--) s[i] = s[i - 1];     int n = s.length();     long long x = 0, y = s[0] - 48;     for (int i = 1; i <= n; i++) {       if (s[i] ==  +  || s[i] ==  * ) {         a[i].x = x;         a[i].y = y;       }       if (s[i] ==  + ) {         x += y;         y = s[i + 1] - 48;       }       if (s[i] ==  * ) {         y *= (s[i + 1] - 48);       }     }     a[n].x = x;     a[n].y = y;     x = 0;     y = s[n] - 48;     for (int i = n; i >= 1; i--) {       if (s[i] ==  +  || s[i] ==  * ) {         b[i].x = x;         b[i].y = y;       }       if (s[i] ==  + ) {         x += y;         y = s[i - 1] - 48;       }       if (s[i] ==  * ) {         y *= (s[i - 1] - 48);       }     }     b[0].x = x;     b[0].y = y;     long long ans = 0;     s[0] =  + ;     s[n + 1] =  + ;     s[n + 2] =  0 ;     for (int i = 0; i <= n + 1; i++) {       if (s[i] ==  +  || s[i] ==  * ) {         x = 0;         y = s[i + 1] - 48;         for (int j = i + 2; j <= n + 1; j++) {           if (s[j] ==  +  || s[j] ==  * ) {             long long res = x + y;             if (s[i] ==  * ) res *= a[i].y;             if (s[j] ==  * ) res *= b[j].y;             if (s[i] ==  + ) res += a[i].y;             if (s[j] ==  + ) res += b[j].y;             res += a[i].x + b[j].x;             if (res > ans) {               ans = res;             }           }           if (s[j] ==  + ) {             x += y;             y = s[j + 1] - 48;           }           if (s[j] ==  * ) {             y *= (s[j + 1] - 48);           }         }       }     }     cout << ans << endl;   }   