You are given a string that is formed from only three characters ‘a’, ‘b’, ‘c’. You are allowed to change atmost ‘k’ characters in the given string while attempting to optimize the uniformity index.
Note : The uniformity index of a string is defined by the maximum length of the substring that contains same character in it.
The first line of input contains two integers n (the size of string) and k. The next line contains a string of length n.
A single integer denoting the maximum uniformity index that can be achieved.
1 <= n <= 10^6
0 <= k <= n
String contains only ‘a’, ‘b’, ‘c’.
Sample Input 0
Sample Output 0
First 3 letters can be changed to ‘c’ and we can get the string ‘cccccc’