1
2
import numpy as np
print((np.array(list((input(),input().strip())[1])) == 'T').reshape(10, -1).all(1).sum())