n,k=map(int,input().split()) L=[int(i) for i in list(input())] a=p=0 for i in range(k): if a>0:a-=1 else:p+=1 a+=L[i%n] print(p)