N,K=map(int,input().split())
P=[0]+list(map(int,input().split()))

S=[0]*(N+1)
for i in range(1,N+1):
    S[i]=S[i-1]+P[i]

M=-1
for j in range(N-K+1):
    M=max(M,S[j+K]-S[j])
print((M+K)/2) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K P=[0]+list(map(int,input().split())) P [0]+list(map(int,input().split())) [0] 0 list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split S=[0]*(N+1) S [0]*(N+1) [0] 0 N+1 N 1 for i in range(1,N+1):
    S[i]=S[i-1]+P[i] i range(1,N+1) range 1 N+1 N 1 S[i]=S[i-1]+P[i] S[i] S i S[i-1]+P[i] S[i-1] S i-1 i 1 P[i] P i M=-1 M -1 for j in range(N-K+1):
    M=max(M,S[j+K]-S[j]) j range(N-K+1) range N-K+1 N-K N K 1 M=max(M,S[j+K]-S[j]) M max(M,S[j+K]-S[j]) max M S[j+K]-S[j] S[j+K] S j+K j K S[j] S j print((M+K)/2) print (M+K)/2 M+K M K 2 P=[0]+list(map(int,input().split())) [0]+list(map(int,input().split())) P S=[0]*(N+1) [0]*(N+1) S K=map(int,input().split()) map(int,input().split()) K M=-1 -1 M M=max(M,S[j+K]-S[j]) max(M,S[j+K]-S[j]) M N,K=map(int,input().split()) map(int,input().split()) N
N,K=map(int,input().split())
P=[0]+list(map(int,input().split()))

S=[0]*(N+1)
for i in range(1,N+1):
    S[i]=S[i-1]+P[i]

M=-1
for j in range(N-K+1):
    M=max(M,S[j+K]-S[j])
print((M+K)/2)
