n,k = map(int, input().split())
a = list(map(int, input().split()))
gki = sum(a[0:k])
tmp = gki
rng = k
for i in range(k,n):
  tmp = tmp-a[i-k]+a[i]
  if tmp>gki:
    gki = tmp
    rng = i+1
  
E = 0
for i in a[rng-k:rng]:
  E += (i+1)/2
print(E)  n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split gki = sum(a[0:k]) gki sum(a[0:k]) sum a[0:k] a 0:k 0 k tmp = gki tmp gki rng = k rng k for i in range(k,n):
  tmp = tmp-a[i-k]+a[i]
  if tmp>gki:
    gki = tmp
    rng = i+1
   i range(k,n) range k n tmp = tmp-a[i-k]+a[i] tmp tmp-a[i-k]+a[i] tmp-a[i-k] tmp a[i-k] a i-k i k a[i] a i if tmp>gki:
    gki = tmp
    rng = i+1
   tmp>gki tmp gki gki = tmp gki tmp rng = i+1 rng i+1 i 1 E = 0 E 0 for i in a[rng-k:rng]:
  E += (i+1)/2 i a[rng-k:rng] a rng-k:rng rng-k rng k rng E += (i+1)/2 E (i+1)/2 i+1 i 1 2 print(E) print E tmp = gki gki tmp rng = k k rng gki = tmp tmp gki E = 0 0 E E += (i+1)/2 (i+1)/2 E tmp = tmp-a[i-k]+a[i] tmp-a[i-k]+a[i] tmp rng = i+1 i+1 rng a = list(map(int, input().split())) list(map(int, input().split())) a n,k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k gki = sum(a[0:k]) sum(a[0:k]) gki
n,k = map(int, input().split())
a = list(map(int, input().split()))
gki = sum(a[0:k])
tmp = gki
rng = k
for i in range(k,n):
  tmp = tmp-a[i-k]+a[i]
  if tmp>gki:
    gki = tmp
    rng = i+1
  
E = 0
for i in a[rng-k:rng]:
  E += (i+1)/2
print(E) 