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

def ev(n):
    return n * (n + 1) / (2 * n)

q = [0]
for i in range(n):
    q.append(ev(p[i]))
    q[i + 1] = q[i] + ev(p[i])
#print(q)

tmp = 0
for j in range(n - k + 1):
    if tmp <= q[j + k] - q[j]:
        tmp = q[j + k] - q[j]
print(tmp) 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 def ev(n):
    return n * (n + 1) / (2 * n) ev return n * (n + 1) / (2 * n) n * (n + 1) / (2 * n) n * (n + 1) n n + 1 n 1 2 * n 2 n n n q = [0] q [0] 0 for i in range(n):
    q.append(ev(p[i]))
    q[i + 1] = q[i] + ev(p[i])
#print(q) i range(n) range n q.append(ev(p[i])) q.append q append ev(p[i]) ev p[i] p i q[i + 1] = q[i] + ev(p[i]) q[i + 1] q i + 1 i 1 q[i] + ev(p[i]) q[i] q i ev(p[i]) ev p[i] p i tmp = 0 tmp 0 for j in range(n - k + 1):
    if tmp <= q[j + k] - q[j]:
        tmp = q[j + k] - q[j] j range(n - k + 1) range n - k + 1 n - k n k 1 if tmp <= q[j + k] - q[j]:
        tmp = q[j + k] - q[j] tmp <= q[j + k] - q[j] tmp q[j + k] - q[j] q[j + k] q j + k j k q[j] q j tmp = q[j + k] - q[j] tmp q[j + k] - q[j] q[j + k] q j + k j k q[j] q j print(tmp) print tmp n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k p = list(map(int, input().split())) list(map(int, input().split())) p tmp = 0 0 tmp def ev(n):
    return n * (n + 1) / (2 * n) def ev(n):
    return n * (n + 1) / (2 * n) ev tmp = q[j + k] - q[j] q[j + k] - q[j] tmp q = [0] [0] q
n, k = map(int, input().split())
p = list(map(int, input().split()))

def ev(n):
    return n * (n + 1) / (2 * n)

q = [0]
for i in range(n):
    q.append(ev(p[i]))
    q[i + 1] = q[i] + ev(p[i])
#print(q)

tmp = 0
for j in range(n - k + 1):
    if tmp <= q[j + k] - q[j]:
        tmp = q[j + k] - q[j]
print(tmp)
