n, k = map(int, input().split()) S = list(map(int, input())) cnt = 0 tot = 0 for i, s in enumerate(S, 1): if tot == 0: cnt += 1 tot += 1 tot -= 1 tot += s if i == k: print(cnt) exit() if sum(S) > n: print(cnt) exit() c = (k - 1) // n - 1 cnt += c * (n - sum(S)) k = (k - 1) % n + 1 for i, s in enumerate(S, 1): if tot == 0: cnt += 1 tot += 1 tot -= 1 tot += s if i == k: print(cnt) exit()