Bob is practicing to grab candy quickly. After all, he has to be speedy if he wants to go trick-or-treating to all 1 million houses. After doing some research, he finds out that during halloween, many of the houses have open doors with candy laid down for people to grab. To practice, he places candies in a row on a table. He is able to grab consecutive candies with one hand, but he wants to grab as many of his favourite candy, Sadness Ranchers, in one handful (since his other hand is holding the bucket of candy). Since he wants to be fast, he will only take one handful before moving to the next house. What is the maximum the amount of Sadness Ranchers he can take with him?
Constraints
Input Specifications
The first line will contain two space separated integers, and .
The next line will contain the string . The string will only contain two letters: c
and s
. s
indicates a Sadness Rancher, while c
indicates a different type of candy.
Output Specifications
Output an integer indicating the maximum amount of Sadness Ranchers Bob can take in a single handful of candy.
Sample Input 1
8 3
ccsscscs
Sample Output 1
2
Explanation for Sample Case 1
Taking the substring starting from index 1, we have the substring css
, which gives 2 Sadness Ranchers. Notice that there are other substrings that also gives 2 Sadness Ranchers.
Sample Input 2
12 5
csscssscccsc
Sample Output 2
4
Comments