1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import sys

n = int(sys.stdin.readline())
k = n // 10
s = sys.stdin.readline()
p = 0

for t in range(0, 10):
    ok = True
    for i in range(0, k):
        ok &= s[t * k + i] == 'T'
    if ok:
        p += 1

print(p)