n,k=map(int,input().split())
p=list(map(int,input().split()))
dp=[0]*(n-k+1)
dp[0]=sum(p[:k])
for i in range(n-k):
    dp[i+1]=dp[i]+p[k+i]-p[i]
print((max(dp)+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 dp=[0]*(n-k+1) dp [0]*(n-k+1) [0] 0 n-k+1 n-k n k 1 dp[0]=sum(p[:k]) dp[0] dp 0 sum(p[:k]) sum p[:k] p :k k for i in range(n-k):
    dp[i+1]=dp[i]+p[k+i]-p[i] i range(n-k) range n-k n k dp[i+1]=dp[i]+p[k+i]-p[i] dp[i+1] dp i+1 i 1 dp[i]+p[k+i]-p[i] dp[i]+p[k+i] dp[i] dp i p[k+i] p k+i k i p[i] p i print((max(dp)+k)/2) print (max(dp)+k)/2 max(dp)+k max(dp) max dp k 2 n,k=map(int,input().split()) map(int,input().split()) n dp=[0]*(n-k+1) [0]*(n-k+1) dp k=map(int,input().split()) map(int,input().split()) k p=list(map(int,input().split())) list(map(int,input().split())) p
n,k=map(int,input().split())
p=list(map(int,input().split()))
dp=[0]*(n-k+1)
dp[0]=sum(p[:k])
for i in range(n-k):
    dp[i+1]=dp[i]+p[k+i]-p[i]
print((max(dp)+k)/2)