N,K= map(int,input().split())
p = list(map(int,input().split()))
sum1=0.0
for i in range (K):
    sum1=((p[i]+1)/2.0)+sum1
sum2=sum1
for i in range(N-K):
    sum1=sum1+((p[i+K]-p[i])/2.0)
    if sum1>sum2:
        sum2=sum1
print(sum2) 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 sum1=0.0 sum1 0.0 for i in range (K):
    sum1=((p[i]+1)/2.0)+sum1 i range (K) range K sum1=((p[i]+1)/2.0)+sum1 sum1 ((p[i]+1)/2.0)+sum1 (p[i]+1)/2.0 p[i]+1 p[i] p i 1 2.0 sum1 sum2=sum1 sum2 sum1 for i in range(N-K):
    sum1=sum1+((p[i+K]-p[i])/2.0)
    if sum1>sum2:
        sum2=sum1 i range(N-K) range N-K N K sum1=sum1+((p[i+K]-p[i])/2.0) sum1 sum1+((p[i+K]-p[i])/2.0) sum1 (p[i+K]-p[i])/2.0 p[i+K]-p[i] p[i+K] p i+K i K p[i] p i 2.0 if sum1>sum2:
        sum2=sum1 sum1>sum2 sum1 sum2 sum2=sum1 sum2 sum1 print(sum2) print sum2 N,K= map(int,input().split()) map(int,input().split()) N sum2=sum1 sum1 sum2 sum2=sum1 sum1 sum2 sum1=sum1+((p[i+K]-p[i])/2.0) sum1+((p[i+K]-p[i])/2.0) sum1 p = list(map(int,input().split())) list(map(int,input().split())) p K= map(int,input().split()) map(int,input().split()) K sum1=((p[i]+1)/2.0)+sum1 ((p[i]+1)/2.0)+sum1 sum1 sum1=0.0 0.0 sum1
N,K= map(int,input().split())
p = list(map(int,input().split()))
sum1=0.0
for i in range (K):
    sum1=((p[i]+1)/2.0)+sum1
sum2=sum1
for i in range(N-K):
    sum1=sum1+((p[i+K]-p[i])/2.0)
    if sum1>sum2:
        sum2=sum1
print(sum2)