n, k = map(int, input().split())
p = list(map(lambda x: (1+int(x))/2, input().split()))
s = sum(p[0:k])
ans = s
for i in range(k, n):
    s += p[i] - p[i-k]
    ans = max(ans, s)
print(ans) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k p = list(map(lambda x: (1+int(x))/2, input().split())) p list(map(lambda x: (1+int(x))/2, input().split())) list map(lambda x: (1+int(x))/2, input().split()) map lambda x: (1+int(x))/2 (1+int(x))/2 1+int(x) 1 int(x) int x 2 x input().split() ().split () input split s = sum(p[0:k]) s sum(p[0:k]) sum p[0:k] p 0:k 0 k ans = s ans s for i in range(k, n):
    s += p[i] - p[i-k]
    ans = max(ans, s) i range(k, n) range k n s += p[i] - p[i-k] s p[i] - p[i-k] p[i] p i p[i-k] p i-k i k ans = max(ans, s) ans max(ans, s) max ans s print(ans) print ans n, k = map(int, input().split()) map(int, input().split()) n ans = s s ans k = map(int, input().split()) map(int, input().split()) k p = list(map(lambda x: (1+int(x))/2, input().split())) list(map(lambda x: (1+int(x))/2, input().split())) p ans = max(ans, s) max(ans, s) ans s += p[i] - p[i-k] p[i] - p[i-k] s s = sum(p[0:k]) sum(p[0:k]) s
n, k = map(int, input().split())
p = list(map(lambda x: (1+int(x))/2, input().split()))
s = sum(p[0:k])
ans = s
for i in range(k, n):
    s += p[i] - p[i-k]
    ans = max(ans, s)
print(ans)