func_code_string: #include <bits/stdc++.h>   using namespace std;   bool solve() {     char s[500];     if (scanf( %s , s) == EOF) return false;     int in = 0, out = 0;     for (int i = 0; s[i]; ++i) {       if (s[i] ==  + ) {         if (out) {           out--;           in++;         } else {           in++;         }       } else {         if (in) {           in--;           out++;         } else {           out++;         }       }     }     printf( %d n , in + out);     return true;   }   int main() {     solve();     return 0;   }   