#include<atcoder/all>
#include<bits/stdc++.h>
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i,a,n) for(int i=(a);i<(int)(n);++i)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define all(box) (box).begin(), (box).end()
using namespace std;
using namespace atcoder;
typedef long long ll;
const ll INF=1LL<<60;
using P=pair<int,int>;
int dx1[]={1,-1,0,0};
int dy1[]={0,0,1,-1};
int dx2[]={0,0,1,-1,1,-1,1,-1};
int dy2[]={1,-1,0,0,1,-1,-1,1};
//10->n進数へ変換
/*
vector<int> ans;
while(k){
ans.push_back(k%2);
k/=2;
}
*/
//n進数->10進数へ変換
/*
ll f(string s,ll k){
ll ans=0;
for(char x:s){
ans *= k;
ans += x - '0';
}
return ans;
}
*/
int main() {
int N, K;
string S;
cin >> N >> K >> S;
int ans=0;
for (int i = 0; i <= N - K; i++) {
bool ok= true;
for (int j = 0; j < K; j++) {
if (S[i + j] == 'X') {
ok = false;
break;
}
}
if (ok) {
ans++;
for (int j = 0; j < K; j++) {
S[i + j] = 'X';
}
}
}
cout << ans << endl;
return 0;
}