Sunny Days
문제
There is a large amount of historical weather data for CEMCity. Each day in the data is listed as either a day with sunshine or a day with precipitation. Jeremy is interested in finding the record for the most consecutive days with sunshine. Unfortunately, the data is incorrect for exactly one day, but Jeremy doesn’t know which day this is.
Your job is to help Jeremy determine the maximum possible number of consecutive days with sunshine.
입력
The first line of input contains a positive integer, , representing the number of days in the historical data. The following lines each contain either the character S or the character P, representing a day with sunshine or a day with precipitation, respectively, in chronological order.
출력
Output the non-negative integer, , which is the maximum possible number of consecutive days with sunshine.
예제
예제 1
8 P S P S S P P S
4