N,K=list(map(int, input().split()))
P=list(map(int, input().split()))
L=[0]*(N+1)
ans=[0]*(N-K+1)
for i in range(N):
  L[i+1]=(P[i]+1)/2 + L[i]
for j in range(N-K+1):
  ans[j]=L[j+K]-L[j]
print(max(ans)) N,K=list(map(int, input().split())) N list(map(int, input().split())) list 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 L=[0]*(N+1) L [0]*(N+1) [0] 0 N+1 N 1 ans=[0]*(N-K+1) ans [0]*(N-K+1) [0] 0 N-K+1 N-K N K 1 for i in range(N):
  L[i+1]=(P[i]+1)/2 + L[i] i range(N) range N L[i+1]=(P[i]+1)/2 + L[i] L[i+1] L i+1 i 1 (P[i]+1)/2 + L[i] (P[i]+1)/2 P[i]+1 P[i] P i 1 2 L[i] L i for j in range(N-K+1):
  ans[j]=L[j+K]-L[j] j range(N-K+1) range N-K+1 N-K N K 1 ans[j]=L[j+K]-L[j] ans[j] ans j L[j+K]-L[j] L[j+K] L j+K j K L[j] L j print(max(ans)) print max(ans) max ans N,K=list(map(int, input().split())) list(map(int, input().split())) N K=list(map(int, input().split())) list(map(int, input().split())) K ans=[0]*(N-K+1) [0]*(N-K+1) ans P=list(map(int, input().split())) list(map(int, input().split())) P L=[0]*(N+1) [0]*(N+1) L
N,K=list(map(int, input().split()))
P=list(map(int, input().split()))
L=[0]*(N+1)
ans=[0]*(N-K+1)
for i in range(N):
  L[i+1]=(P[i]+1)/2 + L[i]
for j in range(N-K+1):
  ans[j]=L[j+K]-L[j]
print(max(ans))