import sys
from itertools import accumulate
input = sys.stdin.readline

n,k=map(int,input().split())
L=list(map(int,input().split()))
M=[(1+i)/2 for i in L]
N=[0]+list(accumulate(M))
ans = 0
for i in range(k,n+1):
    val = N[i]-N[i-k]
    ans = max(val,ans)
print("%.6f"%ans) import sys sys from itertools import accumulate input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline 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 (1+i)/2 for i in L for i in L i L for i in L (1+i)/2 1+i 1 i 2 M=[(1+i)/2 for i in L] M [(1+i)/2 for i in L] N=[0]+list(accumulate(M)) N [0]+list(accumulate(M)) [0] 0 list(accumulate(M)) list accumulate(M) accumulate M ans = 0 ans 0 for i in range(k,n+1):
    val = N[i]-N[i-k]
    ans = max(val,ans) i range(k,n+1) range k n+1 n 1 val = N[i]-N[i-k] val N[i]-N[i-k] N[i] N i N[i-k] N i-k i k ans = max(val,ans) ans max(val,ans) max val ans print("%.6f"%ans) print "%.6f"%ans "%.6f" ans ans = max(val,ans) max(val,ans) ans N=[0]+list(accumulate(M)) [0]+list(accumulate(M)) N n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k input = sys.stdin.readline sys.stdin.readline input M=[(1+i)/2 for i in L] [(1+i)/2 for i in L] M L=list(map(int,input().split())) list(map(int,input().split())) L val = N[i]-N[i-k] N[i]-N[i-k] val ans = 0 0 ans
import sys
from itertools import accumulate
input = sys.stdin.readline

n,k=map(int,input().split())
L=list(map(int,input().split()))
M=[(1+i)/2 for i in L]
N=[0]+list(accumulate(M))
ans = 0
for i in range(k,n+1):
    val = N[i]-N[i-k]
    ans = max(val,ans)
print("%.6f"%ans)
