from numpy import *
N,K = map(int,input().split())
P = list(map(int,input().split()))
Q = (N-K+1)*[0]
R = sum(P[0:K])
Q[0] = R

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

S = argmax(Q)
print(0.5*(sum(P[S:S+K])+K)) from numpy import * 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 = (N-K+1)*[0] Q (N-K+1)*[0] N-K+1 N-K N K 1 [0] 0 R = sum(P[0:K]) R sum(P[0:K]) sum P[0:K] P 0:K 0 K Q[0] = R Q[0] Q 0 R for n in range(1,N-K+1):
  R+=P[n-1+K]-P[n-1]
  Q[n] = R n range(1,N-K+1) range 1 N-K+1 N-K N K 1 R+=P[n-1+K]-P[n-1] R P[n-1+K]-P[n-1] P[n-1+K] P n-1+K n-1 n 1 K P[n-1] P n-1 n 1 Q[n] = R Q[n] Q n R S = argmax(Q) S argmax(Q) argmax Q print(0.5*(sum(P[S:S+K])+K)) print 0.5*(sum(P[S:S+K])+K) 0.5 sum(P[S:S+K])+K sum(P[S:S+K]) sum P[S:S+K] P S:S+K S S+K S K K K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N Q = (N-K+1)*[0] (N-K+1)*[0] Q P = list(map(int,input().split())) list(map(int,input().split())) P R = sum(P[0:K]) sum(P[0:K]) R R+=P[n-1+K]-P[n-1] P[n-1+K]-P[n-1] R S = argmax(Q) argmax(Q) S
from numpy import *
N,K = map(int,input().split())
P = list(map(int,input().split()))
Q = (N-K+1)*[0]
R = sum(P[0:K])
Q[0] = R

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

S = argmax(Q)
print(0.5*(sum(P[S:S+K])+K))