N, K = map(int, input().split())
p = list(map(int, input().split()))
  
# 「和の期待値」は「期待値の和」なので、先に期待値を求める
for i in range(N):
  p[i] = (1+p[i])/2

# 累積和
S = [0]*N
S[0] = p[0]
for i in range(N-1):
  S[i+1] = S[i] + p[i+1]

ans = S[K-1]
for i in range(N-K):
  ans = max(ans, S[i+K] - S[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 for i in range(N):
  p[i] = (1+p[i])/2

# 累積和 i range(N) range N p[i] = (1+p[i])/2 p[i] p i (1+p[i])/2 1+p[i] 1 p[i] p i 2 S = [0]*N S [0]*N [0] 0 N S[0] = p[0] S[0] S 0 p[0] p 0 for i in range(N-1):
  S[i+1] = S[i] + p[i+1] i range(N-1) range N-1 N 1 S[i+1] = S[i] + p[i+1] S[i+1] S i+1 i 1 S[i] + p[i+1] S[i] S i p[i+1] p i+1 i 1 ans = S[K-1] ans S[K-1] S K-1 K 1 for i in range(N-K):
  ans = max(ans, S[i+K] - S[i]) i range(N-K) range N-K N K ans = max(ans, S[i+K] - S[i]) ans max(ans, S[i+K] - S[i]) max ans S[i+K] - S[i] S[i+K] S i+K i K S[i] S i print(ans) print ans ans = max(ans, S[i+K] - S[i]) max(ans, S[i+K] - S[i]) ans ans = S[K-1] S[K-1] ans S = [0]*N [0]*N S K = map(int, input().split()) map(int, input().split()) K p = list(map(int, input().split())) list(map(int, input().split())) p N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
p = list(map(int, input().split()))
  
# 「和の期待値」は「期待値の和」なので、先に期待値を求める
for i in range(N):
  p[i] = (1+p[i])/2

# 累積和
S = [0]*N
S[0] = p[0]
for i in range(N-1):
  S[i+1] = S[i] + p[i+1]

ans = S[K-1]
for i in range(N-K):
  ans = max(ans, S[i+K] - S[i])

print(ans)