#include <bits/stdc++.h>   using namespace std;   int ans[10000];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(NULL);     int n, k;     string s;     cin >> n >> k;     cin >> s;     int cnt = 0;     for (int i = 0; i < s.size(); i++) {       if (s[i] == s[i - 1]) {         cnt++;       } else {         ans[s[i - 1]] += cnt / k;         cnt = 1;       }     }     ans[s[s.size() - 1]] += cnt / k;     int mx = -1;     for (char i =  a ; i <=  z ; i++) {       mx = max(ans[i], mx);     }     cout << mx;   }   