#include <bits/stdc++.h>
#define LLI long long int
#define LD long double
#define PB push_back
#define MP make_pair
#define FORi(i, a, b) for(int i = a; i < b ; ++i)
#define FORd(i, a, b) for(int i = a; i > b ; --i)
using namespace std;
const int mod = 1e9 + 7;
int main() {
int n, ans=1;
cin >> n;
vector<pair<int,char> > v(n);
FORi(i,0,n){
cin >> v[i].first >> v[i].second;
}
sort(v.begin(), v.end());
bool is_neg = 0;
FORi(i,0,n){
if (is_neg && v[i].second == '+'){
ans++;
break;
}
if (!is_neg && v[i].second == '-'){
is_neg = 1;
}
}
cout << ans;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiAKI2RlZmluZSBMTEkgbG9uZyBsb25nIGludAojZGVmaW5lIExEIGxvbmcgZG91YmxlCiNkZWZpbmUgUEIgcHVzaF9iYWNrCiNkZWZpbmUgTVAgbWFrZV9wYWlyCiNkZWZpbmUgRk9SaShpLCBhLCBiKSBmb3IoaW50IGkgPSBhOyBpIDwgYiA7ICsraSkKI2RlZmluZSBGT1JkKGksIGEsIGIpIGZvcihpbnQgaSA9IGE7IGkgPiBiIDsgLS1pKQogCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKY29uc3QgaW50IG1vZCA9IDFlOSArIDc7CgppbnQgbWFpbigpIHsKCWludCBuLCBhbnM9MTsKCWNpbiA+PiBuOwoJdmVjdG9yPHBhaXI8aW50LGNoYXI+ID4gdihuKTsKCUZPUmkoaSwwLG4pewoJCWNpbiA+PiB2W2ldLmZpcnN0ID4+IHZbaV0uc2Vjb25kOwoJfQoJc29ydCh2LmJlZ2luKCksIHYuZW5kKCkpOwoJYm9vbCBpc19uZWcgPSAwOwoJRk9SaShpLDAsbil7CgkJaWYgKGlzX25lZyAmJiB2W2ldLnNlY29uZCA9PSAnKycpewoJCQlhbnMrKzsKCQkJYnJlYWs7CgkJfQoJCWlmICghaXNfbmVnICYmIHZbaV0uc2Vjb25kID09ICctJyl7CgkJCWlzX25lZyA9IDE7CgkJfQoJfQoJY291dCA8PCBhbnM7CglyZXR1cm4gMDsKfQ==