n,k=map(int,input().split()) s=input() s+='x' danger=s.index('x')+1 if((danger-1)%(k+1)==0): print(0) else: print((danger-1)%(k+1))