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

for i in range(n):
    p[i] += 1

ans = []

a = [0] * (n + 1)
for i in range(n):
    a[i+1] = p[i] + a[i]

t = 0
for i in range(k,n+1):
    t = max(t, a[i] - a[i-k])

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

for i in range(n):
    p[i] += 1

ans = []

a = [0] * (n + 1)
for i in range(n):
    a[i+1] = p[i] + a[i]

t = 0
for i in range(k,n+1):
    t = max(t, a[i] - a[i-k])

print(t/2)
