#include using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } #define rep(i, a, b) for(int i = a; i < b; i++) #define scan(x) cin >> x #define print(x) cout << x << "\n" int main() { fastcin; int n; scan(n); char s[n]; scan(s); int no = 1; rep(i, 1, n) { if (s[i]=='-') no--; else if (s[i]=='x') no++; } if (no < 1) no = 1; print(no); return 0; }