1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <algorithm>
#include <string>
#include <cstdlib>

typedef long long ll;
int main(void) {
    int N;
    std::scanf("%i", &N);
    int M = 0;
    std::getchar(); 
    for(int I = 0; I < 10; I++) {
        char C = std::getchar();
        for(int J = 0; J < (N / 10) - 1; J++) {
            char CP = std::getchar();
            if(CP != C || C != 'T') goto E;
            C = CP;
        }
        M++;
        E:;
    }
    std::printf("%i", M);
}