1
2
3
4
5
from textwrap import wrap
from functools import reduce
n = int(input())
data = input()
print(reduce(lambda acc, x: acc if 'N' in x else acc + 1, wrap(data, n // 10), 0))