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


def check(s):
    if all(map(lambda x: x == 'T', s)):
        return 1
    else:
        return 0


n = int(sys.stdin.readline())
c = n // 10
a = list(sys.stdin.readline())
r = sum([check(t) for t in [a[i:i + c] for i in range(0, n, c)]])
print(r)