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

d_tmp = sum(p[0:k])
d_max = sum(p[0:k])
for i in range(n-k):
  d_tmp = d_tmp + p[k+i] - p[i]
  d_max = max(d_max,d_tmp)

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

d_tmp = sum(p[0:k])
d_max = sum(p[0:k])
for i in range(n-k):
  d_tmp = d_tmp + p[k+i] - p[i]
  d_max = max(d_max,d_tmp)

ans = (d_max + k)/2
print(ans)