1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <bits/stdc++.h>

using namespace std;
#define endl '\n'
#define fi first
#define sc second
#define LL long long

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	int N, Result = 0;
	cin >> N;
	for(int i = 0; i < 10; i++){
		bool czydziala = true;
		for(int j = 0; j < N/10; j++){
			char c;
			cin >> c;
			if(c == 'N') czydziala = false;
		}
		if(czydziala) Result++;
	}
	cout << Result << endl;
	return 0;
}