n, k = map(int, input().split())
list_P = list(map(int, input().split()))
cnt = 0

for i in range(k):
    p = list_P[i]
    cnt += (1+p)/2

ans = cnt
for i in range(k, n):
    p, q = list_P[i-k], list_P[i]
    cnt -= (1+p)/2
    cnt += (1+q)/2
    ans = max(ans, cnt)

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

for i in range(k):
    p = list_P[i]
    cnt += (1+p)/2

ans = cnt
for i in range(k, n):
    p, q = list_P[i-k], list_P[i]
    cnt -= (1+p)/2
    cnt += (1+q)/2
    ans = max(ans, cnt)

print(ans)