n,k=map(int,input().split()) s=input() k_=k+1 i=n-1 while(i>k or s[i-1]=='x'): if(s[i-1]=='o'): i-=k_ else: i-=1 if(i==0): break print(i)