N,K=map(int,input().split())
P=list(map(int,input().split()))
from itertools import accumulate
acc=[0]
acc.extend(accumulate(P))
ans=0
for i in range(N-K+1):
  exp=(acc[K+i]-acc[i]+K)/2
  ans=max(exp,ans)
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 from itertools import accumulate acc=[0] acc [0] 0 acc.extend(accumulate(P)) acc.extend acc extend accumulate(P) accumulate P ans=0 ans 0 for i in range(N-K+1):
  exp=(acc[K+i]-acc[i]+K)/2
  ans=max(exp,ans) i range(N-K+1) range N-K+1 N-K N K 1 exp=(acc[K+i]-acc[i]+K)/2 exp (acc[K+i]-acc[i]+K)/2 acc[K+i]-acc[i]+K acc[K+i]-acc[i] acc[K+i] acc K+i K i acc[i] acc i K 2 ans=max(exp,ans) ans max(exp,ans) max exp ans print(ans) print ans ans=max(exp,ans) max(exp,ans) ans acc=[0] [0] acc ans=0 0 ans N,K=map(int,input().split()) map(int,input().split()) N K=map(int,input().split()) map(int,input().split()) K P=list(map(int,input().split())) list(map(int,input().split())) P exp=(acc[K+i]-acc[i]+K)/2 (acc[K+i]-acc[i]+K)/2 exp
N,K=map(int,input().split())
P=list(map(int,input().split()))
from itertools import accumulate
acc=[0]
acc.extend(accumulate(P))
ans=0
for i in range(N-K+1):
  exp=(acc[K+i]-acc[i]+K)/2
  ans=max(exp,ans)
print(ans)