N,K=map(int,input().split())
p=list(map(int,input().split()))
s=0
hoge=0
ans=0
for i in range(K):
    s+=p[i]
    temp=s
for j in range(N-K):
    s=s-p[j]+p[j+K]
    if temp<s:
        temp=s
        hoge=j+1

for k in range(K):
    ans+=(1+p[hoge+k])/2

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 s=0 s 0 hoge=0 hoge 0 ans=0 ans 0 for i in range(K):
    s+=p[i]
    temp=s i range(K) range K s+=p[i] s p[i] p i temp=s temp s for j in range(N-K):
    s=s-p[j]+p[j+K]
    if temp<s:
        temp=s
        hoge=j+1 j range(N-K) range N-K N K s=s-p[j]+p[j+K] s s-p[j]+p[j+K] s-p[j] s p[j] p j p[j+K] p j+K j K if temp<s:
        temp=s
        hoge=j+1 temp<s temp s temp=s temp s hoge=j+1 hoge j+1 j 1 for k in range(K):
    ans+=(1+p[hoge+k])/2 k range(K) range K ans+=(1+p[hoge+k])/2 ans (1+p[hoge+k])/2 1+p[hoge+k] 1 p[hoge+k] p hoge+k hoge k 2 print(ans) print ans temp=s s temp ans=0 0 ans s+=p[i] p[i] s temp=s s temp K=map(int,input().split()) map(int,input().split()) K hoge=0 0 hoge s=s-p[j]+p[j+K] s-p[j]+p[j+K] s ans+=(1+p[hoge+k])/2 (1+p[hoge+k])/2 ans hoge=j+1 j+1 hoge p=list(map(int,input().split())) list(map(int,input().split())) p s=0 0 s N,K=map(int,input().split()) map(int,input().split()) N
N,K=map(int,input().split())
p=list(map(int,input().split()))
s=0
hoge=0
ans=0
for i in range(K):
    s+=p[i]
    temp=s
for j in range(N-K):
    s=s-p[j]+p[j+K]
    if temp<s:
        temp=s
        hoge=j+1

for k in range(K):
    ans+=(1+p[hoge+k])/2

print(ans)
