After a whole year of hard work Byteasar is taking a well-deserved vacation.
He has decided to spend a part of the vacation on a beach.
He has checked the weather forecast and now he knows, for each of the
days of his leave, will it be sunny or cloudy.
Byteasar would like to spend a few consecutive days at the seaside
and he would like all of these days to be sunny.
So he is wondering what is the maximum number of consecutive
sunny days during his leave.
Input
The first line of input contains an integer ().
The second line contains a word composed of letters S and P.
The -th letter of this word (for ) describes
the -th day of Byteasar's leave: the letter S denotes a sunny day
and the letter P denotes a cloudy day.
Output
Your program should output a single integer equal to the maximum number of days
that Byteasar can spend at the seaside.
Example
For the input data:
5
PSPSS
the correct result is:
2
Explanation of the example: Byteasar will spend the fourth and the fifth day
of his leave at the seaside.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.