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

pre = sum(plist[:K])
ans = pre
for i in range(0, N-K):
    pre = pre - plist[i] + plist[i+K]
    ans = max(ans, pre)

print((ans + K)/2) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K plist = list(map(int, input().split())) plist list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split pre = sum(plist[:K]) pre sum(plist[:K]) sum plist[:K] plist :K K ans = pre ans pre for i in range(0, N-K):
    pre = pre - plist[i] + plist[i+K]
    ans = max(ans, pre) i range(0, N-K) range 0 N-K N K pre = pre - plist[i] + plist[i+K] pre pre - plist[i] + plist[i+K] pre - plist[i] pre plist[i] plist i plist[i+K] plist i+K i K ans = max(ans, pre) ans max(ans, pre) max ans pre print((ans + K)/2) print (ans + K)/2 ans + K ans K 2 pre = pre - plist[i] + plist[i+K] pre - plist[i] + plist[i+K] pre ans = max(ans, pre) max(ans, pre) ans ans = pre pre ans pre = sum(plist[:K]) sum(plist[:K]) pre plist = list(map(int, input().split())) list(map(int, input().split())) plist K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
plist = list(map(int, input().split()))

pre = sum(plist[:K])
ans = pre
for i in range(0, N-K):
    pre = pre - plist[i] + plist[i+K]
    ans = max(ans, pre)

print((ans + K)/2)
