Gary likes the Celtic harp on the 1 euro coin. He has a grid of such coins with n rows and m columns. Each coin lies with either the harp or the tail facing up.
Gary wants as many rows as possible to show a harp in every cell. He is allowed one operation: choose a column and turn over every coin in that column. A coin that showed the harp then shows the tail, and a coin that showed the tail then shows the harp.
Gary may repeat the operation as many times as he likes. Find the largest number of rows that show a harp in every cell once he stops.
Input
The first line contains the number of rows n and the number of columns m, separated by a space (1≤n,m≤1000).
Each of the next n lines contains a string of length m describing one row of the grid. The j-th character of the i-th line is 'T' if the coin in row i, column j shows a tail, and 'H' if it shows the harp.
Output
Print one line with the largest possible number of rows that show a harp in every cell.