N,K = map(int,input().split())
P = list(map(int,input().split()))
Q = sum(P[:K])
R = Q

for n in range(N-K):
  Q = Q-P[n]+P[n+K]
  R = max(Q,R)

print((R+K)/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 Q = sum(P[:K]) Q sum(P[:K]) sum P[:K] P :K K R = Q R Q for n in range(N-K):
  Q = Q-P[n]+P[n+K]
  R = max(Q,R) n range(N-K) range N-K N K Q = Q-P[n]+P[n+K] Q Q-P[n]+P[n+K] Q-P[n] Q P[n] P n P[n+K] P n+K n K R = max(Q,R) R max(Q,R) max Q R print((R+K)/2) print (R+K)/2 R+K R K 2 N,K = map(int,input().split()) map(int,input().split()) N R = Q Q R K = map(int,input().split()) map(int,input().split()) K P = list(map(int,input().split())) list(map(int,input().split())) P Q = sum(P[:K]) sum(P[:K]) Q Q = Q-P[n]+P[n+K] Q-P[n]+P[n+K] Q R = max(Q,R) max(Q,R) R
N,K = map(int,input().split())
P = list(map(int,input().split()))
Q = sum(P[:K])
R = Q

for n in range(N-K):
  Q = Q-P[n]+P[n+K]
  R = max(Q,R)

print((R+K)/2)