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