#include <bits/stdc++.h>   int main(void) {     int n, sum = 0;     scanf( %d , &n);     getchar();     char str[n];     gets(str);     for (int i = 0; i < n; i++) {       if (str[i] ==  + )         sum++;       else if (str[i] ==  -  && sum != 0)         sum--;     }     printf( %d n , sum);     return 0;   }   