import numpy as np

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



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

A = np.array(readline().split(), dtype=np.int64) + 1





Acum = np.zeros(N+1, np.float64)

Acum[1:] = A.cumsum()



x = Acum[K:] - Acum[:-K]

print((x.max()/2))

import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read 

input = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines  



from itertools import accumulate



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

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

Pcum = list(accumulate([0] + [(1+p)/2 for p in P]))



ans = max(right - left for left, right in zip(Pcum, Pcum[K:]))

print(ans)  
import numpy as np
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = list(map(int, readline().split()))
A = np.array(readline().split(), dtype=np.int64) + 1
Acum = np.zeros(N + 1, np.float64)
Acum[1:] = A.cumsum()
x = Acum[K:] - Acum[:-K]
print((x.max() / 2))

import sys

sys.setrecursionlimit(10**7)
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from itertools import accumulate

N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
Pcum = list(accumulate([0] + [(1 + p) / 2 for p in P]))
ans = max(right - left for left, right in zip(Pcum, Pcum[K:]))
print(ans)

-import numpy as np +sys.setrecursionlimit(10**7) -readline = sys.stdin.buffer.readline +input = sys.stdin.buffer.readline -N, K = list(map(int, readline().split())) -A = np.array(readline().split(), dtype=np.int64) + 1 -Acum = np.zeros(N + 1, np.float64) -Acum[1:] = A.cumsum() -x = Acum[K:] - Acum[:-K] -print((x.max() / 2)) +from itertools import accumulate + +N, K = list(map(int, input().split())) +P = list(map(int, input().split())) +Pcum = list(accumulate([0] + [(1 + p) / 2 for p in P])) +ans = max(right - left for left, right in zip(Pcum, Pcum[K:])) +print(ans)