N, K = map(int, input().split())
p = list(map(int, input().split()))
for i in range(N):
    p[i] = p[i] / 2 + 0.5

s = 0
for i in range(K):
    s += p[i]
maxSum = s
j = 0

for i in range(K, N):
    s = s + p[i] - p[i-K]
    maxSum = max(maxSum, s)
print(maxSum) 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 for i in range(N):
    p[i] = p[i] / 2 + 0.5 i range(N) range N p[i] = p[i] / 2 + 0.5 p[i] p i p[i] / 2 + 0.5 p[i] / 2 p[i] p i 2 0.5 s = 0 s 0 for i in range(K):
    s += p[i] i range(K) range K s += p[i] s p[i] p i maxSum = s maxSum s j = 0 j 0 for i in range(K, N):
    s = s + p[i] - p[i-K]
    maxSum = max(maxSum, s) i range(K, N) range K N s = s + p[i] - p[i-K] s s + p[i] - p[i-K] s + p[i] s p[i] p i p[i-K] p i-K i K maxSum = max(maxSum, s) maxSum max(maxSum, s) max maxSum s print(maxSum) print maxSum maxSum = s s maxSum s = s + p[i] - p[i-K] s + p[i] - p[i-K] s s += p[i] p[i] s s = 0 0 s j = 0 0 j maxSum = max(maxSum, s) max(maxSum, s) maxSum p = list(map(int, input().split())) list(map(int, input().split())) p N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K
N, K = map(int, input().split())
p = list(map(int, input().split()))
for i in range(N):
    p[i] = p[i] / 2 + 0.5

s = 0
for i in range(K):
    s += p[i]
maxSum = s
j = 0

for i in range(K, N):
    s = s + p[i] - p[i-K]
    maxSum = max(maxSum, s)
print(maxSum)