N, K = [int(d) for d in str(input()).split(' ')]
S = str(input())
positions = [(i + 1) for i, item in enumerate(S) if item == '1']
num = len(positions)
for i in range(len(positions)):
    for j in range(i + 1, len(positions)):
        if positions[j] - positions[i] <= K:
            num += 2
den = N ** 2
print(str(num) + '/' + str(den))
Efficiently find differences in elements of a list