n,k = list(map(int,input().split())) s=input() x=0 cnt=0 total=0 while total