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