SP28460 TAP2016F - Congratulations, Fidel!

Description

**\[Due to SPOJ restrictions, this problem has been modified with respect to the original version used in the Argentinian Programming Tournament of 2016 in order to have multiple test cases per input file. The original version of this problem (in Spanish) can be found at \]** Fidel has finished a fruitful stage of his academic formation by achieving his PhD in Physics. This was mainly the result of his firm attitude towards the formalization of the fabulous results in his fantastic investigation.

Input Format

There are multiple test cases in the input file. For each test case, the first line contains an integer **F**, representing the number of signers (**1 ****1000**). Each of the next **F** lines will contain the name of one of Fidel's friends. The name of each friend is formed by no more than **100** characters from '**A**' to '**Z**'.****

Output Format

For each test case, you must write a single line containing an integer, indicating the maximum number of times that the "DR" abbreviation can appear in fuchsia once we sign our letter, if we follow the rules explained in this problem statement.