1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include <cstdio>

int main() {
    int N;
    int res = 0;
    scanf("%d\n",&N);

    for (int i=0; i<10; ++i) {
        bool ok = true;
        for (int j=0; j<N/10; ++j) {
            char c;
            scanf("%c", &c);
            ok = ok && (c=='T');
        }
        res += (int)ok;
    }

    printf("%d\n", res);
    return 0;
}