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

#あまり深く事を考えずに
print(ans) 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 q = [0] q [0] 0 m = 0 m 0 for i in p:
    m += (1+i)/2
    q.append(m) i p m += (1+i)/2 m (1+i)/2 1+i 1 i 2 q.append(m) q.append q append m ans = 0 ans 0 for i in range(k, n+1):
    ans = max(q[i]-q[i-k], ans)

#あまり深く事を考えずに i range(k, n+1) range k n+1 n 1 ans = max(q[i]-q[i-k], ans) ans max(q[i]-q[i-k], ans) max q[i]-q[i-k] q[i] q i q[i-k] q i-k i k ans print(ans) print ans n, k = map(int, input().split()) map(int, input().split()) n q = [0] [0] q m += (1+i)/2 (1+i)/2 m ans = 0 0 ans p = list(map(int, input().split())) list(map(int, input().split())) p m = 0 0 m ans = max(q[i]-q[i-k], ans) max(q[i]-q[i-k], ans) ans k = map(int, input().split()) map(int, input().split()) k
n, k = map(int, input().split())
p = list(map(int, input().split()))
q = [0]
m = 0
for i in p:
    m += (1+i)/2
    q.append(m)
ans = 0
for i in range(k, n+1):
    ans = max(q[i]-q[i-k], ans)

#あまり深く事を考えずに
print(ans)