n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
r = [0]*(n + 1)
for i in range(1,n + 1):
    r[i] += r[i - 1] + (p[i - 1] + 1) / 2
ans = 0
for j in range(n - k + 1):
    ans = max(ans, r[j+k] - r[j])
print(ans) n, k = list(map(int, input().split())) n list(map(int, input().split())) list 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 r = [0]*(n + 1) r [0]*(n + 1) [0] 0 n + 1 n 1 for i in range(1,n + 1):
    r[i] += r[i - 1] + (p[i - 1] + 1) / 2 i range(1,n + 1) range 1 n + 1 n 1 r[i] += r[i - 1] + (p[i - 1] + 1) / 2 r[i] r i r[i - 1] + (p[i - 1] + 1) / 2 r[i - 1] r i - 1 i 1 (p[i - 1] + 1) / 2 p[i - 1] + 1 p[i - 1] p i - 1 i 1 1 2 ans = 0 ans 0 for j in range(n - k + 1):
    ans = max(ans, r[j+k] - r[j]) j range(n - k + 1) range n - k + 1 n - k n k 1 ans = max(ans, r[j+k] - r[j]) ans max(ans, r[j+k] - r[j]) max ans r[j+k] - r[j] r[j+k] r j+k j k r[j] r j print(ans) print ans r = [0]*(n + 1) [0]*(n + 1) r n, k = list(map(int, input().split())) list(map(int, input().split())) n k = list(map(int, input().split())) list(map(int, input().split())) k p = list(map(int, input().split())) list(map(int, input().split())) p ans = 0 0 ans ans = max(ans, r[j+k] - r[j]) max(ans, r[j+k] - r[j]) ans
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
r = [0]*(n + 1)
for i in range(1,n + 1):
    r[i] += r[i - 1] + (p[i - 1] + 1) / 2
ans = 0
for j in range(n - k + 1):
    ans = max(ans, r[j+k] - r[j])
print(ans)
