#CCC25J4. Sunny Days

Sunny Days

Problem Description

There is a large amount of historical weather data for CEMCity. Each day is marked as S for sunshine or P for precipitation. One day’s data is incorrect, but you don’t know which one.

Determine the maximum possible number of consecutive sunny days.

Input Specification

  • The first line contains a positive integer N, representing the number of days.
  • The next N lines each contain S or P.

Output Specification

Output the maximum possible number of consecutive sunny days.

Sample Input

8
P
S
P
S
S
P
P
S

Sample Output

4