N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[]
for num in P:
    num=(num+1)*0.5
    A.append(num)

T=sum(A[:K])
ans=sum(A[:K])
for i in range(N-K):
    a=T-A[i]+A[i+K]
    ans=max(ans,a)
    T=a
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 A=[] A [] for num in P:
    num=(num+1)*0.5
    A.append(num) num P num=(num+1)*0.5 num (num+1)*0.5 num+1 num 1 0.5 A.append(num) A.append A append num T=sum(A[:K]) T sum(A[:K]) sum A[:K] A :K K ans=sum(A[:K]) ans sum(A[:K]) sum A[:K] A :K K for i in range(N-K):
    a=T-A[i]+A[i+K]
    ans=max(ans,a)
    T=a i range(N-K) range N-K N K a=T-A[i]+A[i+K] a T-A[i]+A[i+K] T-A[i] T A[i] A i A[i+K] A i+K i K ans=max(ans,a) ans max(ans,a) max ans a T=a T a print(ans) print ans K=map(int,input().split()) map(int,input().split()) K N,K=map(int,input().split()) map(int,input().split()) N T=sum(A[:K]) sum(A[:K]) T T=a a T a=T-A[i]+A[i+K] T-A[i]+A[i+K] a A=[] [] A ans=sum(A[:K]) sum(A[:K]) ans num=(num+1)*0.5 (num+1)*0.5 num ans=max(ans,a) max(ans,a) ans P=list(map(int,input().split())) list(map(int,input().split())) P
N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[]
for num in P:
    num=(num+1)*0.5
    A.append(num)

T=sum(A[:K])
ans=sum(A[:K])
for i in range(N-K):
    a=T-A[i]+A[i+K]
    ans=max(ans,a)
    T=a
print(ans)