1
2
3
n, s = int(input()), input()
n //= 10
print(sum(not s[i*n:i*n+n].count('N') for i in range(0, 10)))