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