1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python3
from sys import stdin


def solve(N: int, t: str) -> int:
    t = [True if x == 'T' else False for x in t.upper()]
    c = N // 10
    return sum(
        1
        for i in range(0, N, c)
        if all(t[i:i+c])
    )


if __name__ == '__main__':
    N, t = stdin.read().split(maxsplit=1)
    N = int(N)
    assert N % 10 == 0
    print(solve(N, t.strip()))