1
2
3
4
#!/usr/bin/env python3
n, x, r = int(input()), input(), 0
bs = n//10
print(sum([int(x[i*bs:(i+1)*bs] == 'T'*bs) for i in range(10)]))