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