import numpy as np
n, k = map(int, input().split())
P = list(map(int, input().split()))
P = list(map(lambda x: (x + 1) * x / 2 / x, P))
P = np.array([0] + P)
P = np.cumsum(P)
ans = np.zeros(n - (k - 1))
for i in range(n - (k - 1)):
    ans[i] = P[k + i] - P[i]
print(np.max(ans)) import numpy as np numpy n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k P = list(map(int, input().split())) P list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split P = list(map(lambda x: (x + 1) * x / 2 / x, P)) P list(map(lambda x: (x + 1) * x / 2 / x, P)) list map(lambda x: (x + 1) * x / 2 / x, P) map lambda x: (x + 1) * x / 2 / x (x + 1) * x / 2 / x (x + 1) * x / 2 (x + 1) * x x + 1 x 1 x 2 x x P P = np.array([0] + P) P np.array([0] + P) np.array np array [0] + P [0] 0 P P = np.cumsum(P) P np.cumsum(P) np.cumsum np cumsum P ans = np.zeros(n - (k - 1)) ans np.zeros(n - (k - 1)) np.zeros np zeros n - (k - 1) n k - 1 k 1 for i in range(n - (k - 1)):
    ans[i] = P[k + i] - P[i] i range(n - (k - 1)) range n - (k - 1) n k - 1 k 1 ans[i] = P[k + i] - P[i] ans[i] ans i P[k + i] - P[i] P[k + i] P k + i k i P[i] P i print(np.max(ans)) print np.max(ans) np.max np max ans ans = np.zeros(n - (k - 1)) np.zeros(n - (k - 1)) ans n, k = map(int, input().split()) map(int, input().split()) n P = list(map(int, input().split())) list(map(int, input().split())) P k = map(int, input().split()) map(int, input().split()) k P = np.array([0] + P) np.array([0] + P) P P = np.cumsum(P) np.cumsum(P) P P = list(map(lambda x: (x + 1) * x / 2 / x, P)) list(map(lambda x: (x + 1) * x / 2 / x, P)) P
import numpy as np
n, k = map(int, input().split())
P = list(map(int, input().split()))
P = list(map(lambda x: (x + 1) * x / 2 / x, P))
P = np.array([0] + P)
P = np.cumsum(P)
ans = np.zeros(n - (k - 1))
for i in range(n - (k - 1)):
    ans[i] = P[k + i] - P[i]
print(np.max(ans))