N,K = list(map(int,input().split()))
P = list(map(int,input().split()))

import numpy as np

Q = np.cumsum(P)

R = np.pad(Q,K,'constant', constant_values=0)[:N]

a = np.argmax(Q-R)

ans = 0
for i in range(K):
    ans += (1.00+P[a-i])/2.00
print(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 import numpy as np numpy Q = np.cumsum(P) Q np.cumsum(P) np.cumsum np cumsum P R = np.pad(Q,K,'constant', constant_values=0)[:N] R np.pad(Q,K,'constant', constant_values=0)[:N] np.pad(Q,K,'constant', constant_values=0) np.pad np pad Q K 'constant' constant_values=0 constant_values 0 :N N a = np.argmax(Q-R) a np.argmax(Q-R) np.argmax np argmax Q-R Q R ans = 0 ans 0 for i in range(K):
    ans += (1.00+P[a-i])/2.00 i range(K) range K ans += (1.00+P[a-i])/2.00 ans (1.00+P[a-i])/2.00 1.00+P[a-i] 1.00 P[a-i] P a-i a i 2.00 print(ans) print ans K = list(map(int,input().split())) list(map(int,input().split())) K N,K = list(map(int,input().split())) list(map(int,input().split())) N ans += (1.00+P[a-i])/2.00 (1.00+P[a-i])/2.00 ans R = np.pad(Q,K,'constant', constant_values=0)[:N] np.pad(Q,K,'constant', constant_values=0)[:N] R P = list(map(int,input().split())) list(map(int,input().split())) P ans = 0 0 ans Q = np.cumsum(P) np.cumsum(P) Q a = np.argmax(Q-R) np.argmax(Q-R) a
N,K = list(map(int,input().split()))
P = list(map(int,input().split()))

import numpy as np

Q = np.cumsum(P)

R = np.pad(Q,K,'constant', constant_values=0)[:N]

a = np.argmax(Q-R)

ans = 0
for i in range(K):
    ans += (1.00+P[a-i])/2.00
print(ans)