@staticmethod
def c():
    (n, k, *a) = map(int, sys.stdin.read().split())
    a = np.array(([0] + a))
    np.cumsum(a, out=a)
    s = (a[k:] - a[:(- k)]).sum()
    print(s)
@staticmethod
def c():
    (n, k, *a) = map(int, sys.stdin.read().split())
    a = np.array(([0] + a))
    np.cumsum(a, out=a)
    s = (a[k:] - a[:(- k)]).sum()
    print(s)