n,k = map(int,input().split())
P = list(map(int,input().split()))

P[0] = (P[0]+1.)/2
for i in range(1,len(P)):
    P[i] = (P[i]+1.)/2
    P[i] = P[i-1]+P[i]

ans = 0.

if n==1:
    ans = P[0]

elif len(P)-k==0:
    ans = P[k-1]
else:
    for i in range(len(P)-k):
        ans = max(ans,(P[i+k]-P[i]))
        
    
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 P[0] = (P[0]+1.)/2 P[0] P 0 (P[0]+1.)/2 P[0]+1. P[0] P 0 1. 2 for i in range(1,len(P)):
    P[i] = (P[i]+1.)/2
    P[i] = P[i-1]+P[i] i range(1,len(P)) range 1 len(P) len P P[i] = (P[i]+1.)/2 P[i] P i (P[i]+1.)/2 P[i]+1. P[i] P i 1. 2 P[i] = P[i-1]+P[i] P[i] P i P[i-1]+P[i] P[i-1] P i-1 i 1 P[i] P i ans = 0. ans 0. if n==1:
    ans = P[0]

elif len(P)-k==0:
    ans = P[k-1]
else:
    for i in range(len(P)-k):
        ans = max(ans,(P[i+k]-P[i]))
        
     n==1 n 1 ans = P[0] ans P[0] P 0 elif len(P)-k==0:
    ans = P[k-1] len(P)-k==0 len(P)-k len(P) len P k 0 ans = P[k-1] ans P[k-1] P k-1 k 1 for i in range(len(P)-k):
        ans = max(ans,(P[i+k]-P[i]))
        
     i range(len(P)-k) range len(P)-k len(P) len P k ans = max(ans,(P[i+k]-P[i])) ans max(ans,(P[i+k]-P[i])) max ans P[i+k]-P[i] P[i+k] P i+k i k P[i] P i print(ans) print ans P = list(map(int,input().split())) list(map(int,input().split())) P n,k = map(int,input().split()) map(int,input().split()) n ans = P[0] P[0] ans ans = P[k-1] P[k-1] ans k = map(int,input().split()) map(int,input().split()) k ans = 0. 0. ans ans = max(ans,(P[i+k]-P[i])) max(ans,(P[i+k]-P[i])) ans
n,k = map(int,input().split())
P = list(map(int,input().split()))

P[0] = (P[0]+1.)/2
for i in range(1,len(P)):
    P[i] = (P[i]+1.)/2
    P[i] = P[i-1]+P[i]

ans = 0.

if n==1:
    ans = P[0]

elif len(P)-k==0:
    ans = P[k-1]
else:
    for i in range(len(P)-k):
        ans = max(ans,(P[i+k]-P[i]))
        
    
print(ans)