#include using namespace std; #define INF 2000000000 #define MOD 1000000007 typedef long long ll; typedef pair P; int main() { int n; cin >> n; vector s(n); vector a(n); for (int i = 0; i < n; i++) { cin >> s[i]; } for (int i = 0; i < n; i++) { for (int j = 0; j < s.size(); j++) { if (s[i][j]=='o') { a[i]++; } else if (s[i][j]=='-'&&i==0) { a[i]++; } } } int num = a[0]; sort(a.begin(),a.end()); int ret = upper_bound(a.begin(), a.end(),num)-a.begin(); ret = a.size() - ret + 1; cout << ret << endl; }