N,K = map(int,input().split())
P = list(map(int,input().split()))

# 累積和 
s = [0] * (N+1)
for i in range(N):# O(N)
    s[i+1] = s[i] + P[i]

# [j,j+K) の和の最大値と j を保持 
m = 0
midx = 0
for j in range(N-K+1):# O(N)
    v = s[j+K] - s[j]
    if v > m:
        m = v
        midx = j
        
E = 0
for k in range(midx,midx+K):# O(K)
    x = P[k]
    E += (1/x)*(x*(x+1)/2)
print(E) 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] * (N+1) s [0] * (N+1) [0] 0 N+1 N 1 for i in range(N):# O(N)
    s[i+1] = s[i] + P[i]

# [j,j+K) の和の最大値と j を保持  i range(N) range N s[i+1] = s[i] + P[i] s[i+1] s i+1 i 1 s[i] + P[i] s[i] s i P[i] P i m = 0 m 0 midx = 0 midx 0 for j in range(N-K+1):# O(N)
    v = s[j+K] - s[j]
    if v > m:
        m = v
        midx = j
         j range(N-K+1) range N-K+1 N-K N K 1 v = s[j+K] - s[j] v s[j+K] - s[j] s[j+K] s j+K j K s[j] s j if v > m:
        m = v
        midx = j
         v > m v m m = v m v midx = j midx j E = 0 E 0 for k in range(midx,midx+K):# O(K)
    x = P[k]
    E += (1/x)*(x*(x+1)/2) k range(midx,midx+K) range midx midx+K midx K x = P[k] x P[k] P k E += (1/x)*(x*(x+1)/2) E (1/x)*(x*(x+1)/2) 1/x 1 x x*(x+1)/2 x*(x+1) x x+1 x 1 2 print(E) print E K = map(int,input().split()) map(int,input().split()) K x = P[k] P[k] x m = 0 0 m N,K = map(int,input().split()) map(int,input().split()) N midx = 0 0 midx E += (1/x)*(x*(x+1)/2) (1/x)*(x*(x+1)/2) E m = v v m E = 0 0 E P = list(map(int,input().split())) list(map(int,input().split())) P s = [0] * (N+1) [0] * (N+1) s midx = j j midx v = s[j+K] - s[j] s[j+K] - s[j] v
N,K = map(int,input().split())
P = list(map(int,input().split()))

# 累積和 
s = [0] * (N+1)
for i in range(N):# O(N)
    s[i+1] = s[i] + P[i]

# [j,j+K) の和の最大値と j を保持 
m = 0
midx = 0
for j in range(N-K+1):# O(N)
    v = s[j+K] - s[j]
    if v > m:
        m = v
        midx = j
        
E = 0
for k in range(midx,midx+K):# O(K)
    x = P[k]
    E += (1/x)*(x*(x+1)/2)
print(E)