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

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



x=[]

for i in p:

 x.append((i+1)/2)



b=[0]

for i in range(1,n+1):

 b.append(b[i-1]+x[i-1])



ans=0

for i in range(n-k+1):

 ans=max(ans,b[i+k]-b[i])



print(ans)
from itertools import accumulate



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

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



x=[]

for i in p:

 x.append((i+1)/2)



b=[0]+list(accumulate(x))



'''

bb=[0]

for i in range(1,n+1):

 bb.append(bb[i-1]+x[i-1])



print(b)

print(bb)

'''



ans=0

for i in range(n-k+1):

 ans=max(ans,b[i+k]-b[i])



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

from itertools import accumulate

n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
x = []
for i in p:
    x.append((i + 1) / 2)
b = [0] + list(accumulate(x))
"""
bb=[0]
for i in range(1,n+1):
 bb.append(bb[i-1]+x[i-1])
print(b)
print(bb)
"""
ans = 0
for i in range(n - k + 1):
    ans = max(ans, b[i + k] - b[i])
print(ans)

+from itertools import accumulate + -b = [0] -for i in range(1, n + 1): -    b.append(b[i - 1] + x[i - 1]) +b = [0] + list(accumulate(x)) +""" +bb=[0] +for i in range(1,n+1): + bb.append(bb[i-1]+x[i-1]) +print(b) +print(bb) +"""