1
2
3
4
5
6
7
8
n = int(input())
s = input()
group = n // 10
res = 0
for i in range(10):
	if "N" not in s[group * i : group * (i+1)]:
		res += 1
print(res)