1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Author: Bartek Knapik

#include <cstdio>

int main()
{
    int N;
    char scores[111];
    scanf("%d", &N);
    scanf("%s", scores);

    int ans, pos, group;

    ans = pos = 0;
	
    for (int i = 0; i < 10; ++i)
    {
        group = 0;
        for (int j = 0; j < (N / 10); ++j)
            group += (scores[pos++] == 'T');
        ans += group / (N / 10);
    }
    printf("%d\n", ans);
    return 0;
}