# -*- coding: utf-8 -*-
N, K = map(int, input().split())
p = list(map(int, input().split()))

total = [0] * N
total[0] = p[0]
for i in range(1, N):
  total[i] = total[i-1] + p[i]

total_K = 0
max_i = 0
for i in range(N-K+1):
  if i == 0:
    total_K = total[K-1]
  else:
    if total[i+K-1] - total[i-1] > total_K:
      total_K = total[i+K-1] - total[i-1]
      max_i = i

ans = 0
for i in range(K):
  ans += (p[max_i + i] + 1) / 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 total = [0] * N total [0] * N [0] 0 N total[0] = p[0] total[0] total 0 p[0] p 0 for i in range(1, N):
  total[i] = total[i-1] + p[i] i range(1, N) range 1 N total[i] = total[i-1] + p[i] total[i] total i total[i-1] + p[i] total[i-1] total i-1 i 1 p[i] p i total_K = 0 total_K 0 max_i = 0 max_i 0 for i in range(N-K+1):
  if i == 0:
    total_K = total[K-1]
  else:
    if total[i+K-1] - total[i-1] > total_K:
      total_K = total[i+K-1] - total[i-1]
      max_i = i i range(N-K+1) range N-K+1 N-K N K 1 if i == 0:
    total_K = total[K-1]
  else:
    if total[i+K-1] - total[i-1] > total_K:
      total_K = total[i+K-1] - total[i-1]
      max_i = i i == 0 i 0 total_K = total[K-1] total_K total[K-1] total K-1 K 1 if total[i+K-1] - total[i-1] > total_K:
      total_K = total[i+K-1] - total[i-1]
      max_i = i total[i+K-1] - total[i-1] > total_K total[i+K-1] - total[i-1] total[i+K-1] total i+K-1 i+K i K 1 total[i-1] total i-1 i 1 total_K total_K = total[i+K-1] - total[i-1] total_K total[i+K-1] - total[i-1] total[i+K-1] total i+K-1 i+K i K 1 total[i-1] total i-1 i 1 max_i = i max_i i ans = 0 ans 0 for i in range(K):
  ans += (p[max_i + i] + 1) / 2 i range(K) range K ans += (p[max_i + i] + 1) / 2 ans (p[max_i + i] + 1) / 2 p[max_i + i] + 1 p[max_i + i] p max_i + i max_i i 1 2 print(ans) print ans ans = 0 0 ans total_K = total[i+K-1] - total[i-1] total[i+K-1] - total[i-1] total_K total = [0] * N [0] * N total total_K = 0 0 total_K 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 max_i = 0 0 max_i ans += (p[max_i + i] + 1) / 2 (p[max_i + i] + 1) / 2 ans max_i = i i max_i total_K = total[K-1] total[K-1] total_K
# -*- coding: utf-8 -*-
N, K = map(int, input().split())
p = list(map(int, input().split()))

total = [0] * N
total[0] = p[0]
for i in range(1, N):
  total[i] = total[i-1] + p[i]

total_K = 0
max_i = 0
for i in range(N-K+1):
  if i == 0:
    total_K = total[K-1]
  else:
    if total[i+K-1] - total[i-1] > total_K:
      total_K = total[i+K-1] - total[i-1]
      max_i = i

ans = 0
for i in range(K):
  ans += (p[max_i + i] + 1) / 2
print(ans)