1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n = int(input())
s = input()
x = 0
for i in range(10):
	good = True
	for j in range(n // 10):
		if s[i * n // 10 + j] == 'N':
			good = False
	if good:
		x += 1
print(x)