# https://yukicoder.me/problems/no/78


def data_input():
    N, K = map(int, input().split())
    S = [int(i) for i in input()]
    return N, K, S


def buy_box(ice_box, buy=0, hit=0):
    for ice in ice_box:
        if hit > 0:
            hit -= 1
        else:
            buy += 1
        hit += ice
    return buy, hit


def main():
    box_len, full, ice_box = data_input()

    if box_len >= full:  # 1箱で足りる
        print(buy_box(ice_box[:full])[0])

    else:
        buy, hit = buy_box(ice_box)
        if hit >= box_len:  # 今後買う必要なし
            print(buy)
        else:  # hitの数買わず、繰り返して最後調整
            need_box = full // box_len
            last_ice = full % box_len
            buy += (buy_box(ice_box, hit=hit)[0] * (need_box - 1) + buy_box(ice_box[:last_ice], hit=hit)[0])
            print(buy)

main()