n, k = map(int, input().split())

def cul(x):
    ans = (1 + x)*x/(2*x)
    return ans

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

def cul(x):
    ans = (1 + x)*x/(2*x)
    return ans

p = list(map(cul, list(map(int, input().split()))))
cnt = sum(p[0:k])
ans = cnt
for i in range(k, n):
    cnt += p[i] - p[i - k]
    ans = max(ans, cnt)
print(ans)