N,K = [int(i) for i in input().split()] S = list(input()) buy = 1 eat = 1 atari = int(S[0]) box = 1 while eat < K: if atari >= 1: atari += int(S[box]) box += 1 eat+= 1 atari -= 1 elif atari == 0: atari += int(S[box]) eat += 1 buy += 1 box += 1 if box >= N: box -= N print(buy)