func_code_string: #include <bits/stdc++.h>   const int N = 1e5 + 10;   const int MOD = 1e9 + 7;   const int INF = 2e9;   const long long INFLL = 1e18;   const double PI = acos((double)-1);   inline int mult(int a, int b, int p = MOD) { return (1ll * a * b) % p; }   inline int add(int a, int b, int p = MOD) { return (1ll * a + b) % p; }   inline int fpow(long long n, long long k, int p = MOD) {     long long r = 1;     for (; k; k >>= 1) {       if (k & 1) r = r * n % p;       n = n * n % p;     }     return r;   }   inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }   using namespace std;   int main() {     ios::sync_with_stdio(false);     string s;     cin >> s;     int n = s.length();     int x = 0, y = 0;     int ans = 0;     for (int i = 0; i < n; i++) {       if (s[i] ==  - ) {         y++;         if (x > 0)           x--;         else           ans++;       } else {         x++;         if (y > 0)           y--;         else           ans++;       }     }     cout << ans;     return 0;   }   