#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans = 0;
while (cin >> s) {
for (int i = 2; i < s.length(); i++) {
if (s[i - 2] == ':' && s[i - 1] == '-') {
if (s[i] == ')') {//开心
ans++;
} else if (s[i] == '(') {//不开心
ans--;
}
}
}
}
cout << ans;
return 0;
}
评论区