def checknext(plc, cnt): global b c = cnt c += int(S[plc % N]) j = plc + 1 if j < K: if c == 0: b += 1 checknext(j, c) else: c -= 1 checknext(j, c) else: print(b) N, K = map(int, input().split()) S = input() b = 1 checknext(0, 0)