n,k=map(int,input().split()) s=input() cost=0 prize=0 if n0: prize-=1 else: cost+=1 if c!="0": prize+=int(c) cost+=((k-1)//n-1)*max(cost-prize,0) for c in s[:(k-1)%n+1]: if prize>0: prize-=1 else: cost+=1 if c!="0": prize+=int(c) print(cost)