n, k = map(int, input().split())
p = list(map(int, input().split()))
a = [0] * n 
asum = 0
for i in range(n):
  a[i] = (p[i]+1)/2 + asum
  asum = a[i]
ans = a[k-1]
for f in range(1, n-k+1):
  ans = max([ans, a[f+k-1] - a[f-1]])
print(ans)   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 a = [0] * n a [0] * n [0] 0 n asum = 0 asum 0 for i in range(n):
  a[i] = (p[i]+1)/2 + asum
  asum = a[i] i range(n) range n a[i] = (p[i]+1)/2 + asum a[i] a i (p[i]+1)/2 + asum (p[i]+1)/2 p[i]+1 p[i] p i 1 2 asum asum = a[i] asum a[i] a i ans = a[k-1] ans a[k-1] a k-1 k 1 for f in range(1, n-k+1):
  ans = max([ans, a[f+k-1] - a[f-1]]) f range(1, n-k+1) range 1 n-k+1 n-k n k 1 ans = max([ans, a[f+k-1] - a[f-1]]) ans max([ans, a[f+k-1] - a[f-1]]) max [ans, a[f+k-1] - a[f-1]] ans a[f+k-1] - a[f-1] a[f+k-1] a f+k-1 f+k f k 1 a[f-1] a f-1 f 1 print(ans) print ans asum = 0 0 asum ans = max([ans, a[f+k-1] - a[f-1]]) max([ans, a[f+k-1] - a[f-1]]) ans k = map(int, input().split()) map(int, input().split()) k ans = a[k-1] a[k-1] ans asum = a[i] a[i] asum p = list(map(int, input().split())) list(map(int, input().split())) p n, k = map(int, input().split()) map(int, input().split()) n a = [0] * n [0] * n a
n, k = map(int, input().split())
p = list(map(int, input().split()))
a = [0] * n 
asum = 0
for i in range(n):
  a[i] = (p[i]+1)/2 + asum
  asum = a[i]
ans = a[k-1]
for f in range(1, n-k+1):
  ans = max([ans, a[f+k-1] - a[f-1]])
print(ans)  