import sys
input = sys.stdin.readline

(n, k), s, res, sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0
for i in range(n):
	if i < k: sm += s[i]
	else: sm += s[i]; sm -= s[i-k]
	res = max(res, sm)
print(f'{res:.10f}')
# print(f'{max([sum(s[i:i+k]) for i in range(n - k + 1)]):.10f}') import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline (n, k), s, res, sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0 (n, k) n k map(int, input().split()) map int input().split() ().split () input split s list(map(lambda x: (int(x) + 1) / 2, input().split())) list map(lambda x: (int(x) + 1) / 2, input().split()) map lambda x: (int(x) + 1) / 2 (int(x) + 1) / 2 int(x) + 1 int(x) int x 1 2 x input().split() ().split () input split res 0 sm 0 for i in range(n):
	if i < k: sm += s[i]
	else: sm += s[i]; sm -= s[i-k]
	res = max(res, sm) i range(n) range n if i < k: sm += s[i]
	else: sm += s[i]; sm -= s[i-k]
	 i < k i k res = max(res, sm) res max(res, sm) max res sm print(f'{res:.10f}') print f'{res:.10f}' sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0 0 sm s, res, sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0 list(map(lambda x: (int(x) + 1) / 2, input().split())) s res = max(res, sm) max(res, sm) res input = sys.stdin.readline sys.stdin.readline input res, sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0 0 res
import sys
input = sys.stdin.readline

(n, k), s, res, sm = map(int, input().split()), list(map(lambda x: (int(x) + 1) / 2, input().split())), 0, 0
for i in range(n):
	if i < k: sm += s[i]
	else: sm += s[i]; sm -= s[i-k]
	res = max(res, sm)
print(f'{res:.10f}')
# print(f'{max([sum(s[i:i+k]) for i in range(n - k + 1)]):.10f}')