n = int(input()) s = input() frag_len = n // 10 score = sum([s[start:start+frag_len] == 'T' * frag_len for start in range(0, n, frag_len)]) print(score)
1 2 3 4 5 6 7 | n = int(input()) s = input() frag_len = n // 10 score = sum([s[start:start+frag_len] == 'T' * frag_len for start in range(0, n, frag_len)]) print(score) |