n,k=map(int,input().split())
l=list(map(int,input().split()))
maxi=0
suml=sum(l[:k])
maxl=sum(l[:k])
for i in range(n-k):
    if suml-l[i]+l[k+i]>maxl:
        maxl=suml-l[i]+l[k+i]
        maxi=i+1
    suml=suml-l[i]+l[k+i]
sumsum=0
for j in range(maxi,maxi+k):
    sumsum+=(l[j]+1)/2
print(sumsum) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split maxi=0 maxi 0 suml=sum(l[:k]) suml sum(l[:k]) sum l[:k] l :k k maxl=sum(l[:k]) maxl sum(l[:k]) sum l[:k] l :k k for i in range(n-k):
    if suml-l[i]+l[k+i]>maxl:
        maxl=suml-l[i]+l[k+i]
        maxi=i+1
    suml=suml-l[i]+l[k+i] i range(n-k) range n-k n k if suml-l[i]+l[k+i]>maxl:
        maxl=suml-l[i]+l[k+i]
        maxi=i+1
     suml-l[i]+l[k+i]>maxl suml-l[i]+l[k+i] suml-l[i] suml l[i] l i l[k+i] l k+i k i maxl maxl=suml-l[i]+l[k+i] maxl suml-l[i]+l[k+i] suml-l[i] suml l[i] l i l[k+i] l k+i k i maxi=i+1 maxi i+1 i 1 suml=suml-l[i]+l[k+i] suml suml-l[i]+l[k+i] suml-l[i] suml l[i] l i l[k+i] l k+i k i sumsum=0 sumsum 0 for j in range(maxi,maxi+k):
    sumsum+=(l[j]+1)/2 j range(maxi,maxi+k) range maxi maxi+k maxi k sumsum+=(l[j]+1)/2 sumsum (l[j]+1)/2 l[j]+1 l[j] l j 1 2 print(sumsum) print sumsum sumsum=0 0 sumsum suml=sum(l[:k]) sum(l[:k]) suml maxl=sum(l[:k]) sum(l[:k]) maxl k=map(int,input().split()) map(int,input().split()) k maxi=i+1 i+1 maxi l=list(map(int,input().split())) list(map(int,input().split())) l maxi=0 0 maxi sumsum+=(l[j]+1)/2 (l[j]+1)/2 sumsum maxl=suml-l[i]+l[k+i] suml-l[i]+l[k+i] maxl suml=suml-l[i]+l[k+i] suml-l[i]+l[k+i] suml n,k=map(int,input().split()) map(int,input().split()) n
n,k=map(int,input().split())
l=list(map(int,input().split()))
maxi=0
suml=sum(l[:k])
maxl=sum(l[:k])
for i in range(n-k):
    if suml-l[i]+l[k+i]>maxl:
        maxl=suml-l[i]+l[k+i]
        maxi=i+1
    suml=suml-l[i]+l[k+i]
sumsum=0
for j in range(maxi,maxi+k):
    sumsum+=(l[j]+1)/2
print(sumsum)