n, k = map(int, input().split())

p = list(map(int, input().split()))

for i in range(1, len(p)):
  p[i] += p[i-1]
ans = p[k-1]
for i in range(k, n):
  ans = max(ans, p[i]-p[i-k])

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

print((k+ans)/2)