from itertools import accumulate

N, K = list(map(int, input().split()))

C = list(map(int, input().split()))

A=[]

for i in range(N):

  A.append((C[i]+1)/2)

B = [0] + A

B = list(accumulate(B))



ans = []

for i in range(N-K+1):

    ans.append(B[i+K]-B[i])

print((max(ans)))
import itertools

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

#4317

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

def keisan(x):

  return (k+x)/2

ans=0

zzz=list(itertools.accumulate(p))

zzz.insert(0,0)

han=0

for i in range(k,len(zzz)):

  if han<zzz[i]-zzz[i-k]:

    han=zzz[i]-zzz[i-k]

print((keisan(han)))
from itertools import accumulate

N, K = list(map(int, input().split()))
C = list(map(int, input().split()))
A = []
for i in range(N):
    A.append((C[i] + 1) / 2)
B = [0] + A
B = list(accumulate(B))
ans = []
for i in range(N - K + 1):
    ans.append(B[i + K] - B[i])
print((max(ans)))

import itertools

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


def keisan(x):
    return (k + x) / 2


ans = 0
zzz = list(itertools.accumulate(p))
zzz.insert(0, 0)
han = 0
for i in range(k, len(zzz)):
    if han < zzz[i] - zzz[i - k]:
        han = zzz[i] - zzz[i - k]
print((keisan(han)))

-from itertools import accumulate +import itertools -N, K = list(map(int, input().split())) -C = list(map(int, input().split())) -A = [] -for i in range(N): -    A.append((C[i] + 1) / 2) -B = [0] + A -B = list(accumulate(B)) -ans = [] -for i in range(N - K + 1): -    ans.append(B[i + K] - B[i]) -print((max(ans))) +n, k = list(map(int, input().split())) +# 4317 +p = list(map(int, input().split())) + + +def keisan(x): +    return (k + x) / 2 + + +ans = 0 +zzz = list(itertools.accumulate(p)) +zzz.insert(0, 0) +han = 0 +for i in range(k, len(zzz)): +    if han < zzz[i] - zzz[i - k]: +        han = zzz[i] - zzz[i - k] +print((keisan(han)))