def main():
	N, K = [int(x) for x in input().split(" ")]
	P = [int(p) for p in input().split(" ")]
	E = [sum(P[:K])]
	for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	print((max(E) + K)/2)

main() def main():
	N, K = [int(x) for x in input().split(" ")]
	P = [int(p) for p in input().split(" ")]
	E = [sum(P[:K])]
	for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	print((max(E) + K)/2) main int(x) for x in input().split(" ") for x in input().split(" ") x input().split(" ") ().split () input split " " for x in input().split(" ") int(x) int x N, K = [int(x) for x in input().split(" ")] N [int(x) for x in input().split(" ")] K int(p) for p in input().split(" ") for p in input().split(" ") p input().split(" ") ().split () input split " " for p in input().split(" ") int(p) int p P = [int(p) for p in input().split(" ")] P [int(p) for p in input().split(" ")] E = [sum(P[:K])] E [sum(P[:K])] sum(P[:K]) sum P[:K] P :K K for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	 i range(N - K) range N - K N K E.append(E[-1] - P[i] + P[i + K]) E.append E append E[-1] - P[i] + P[i + K] E[-1] - P[i] E[-1] E -1 P[i] P i P[i + K] P i + K i K print((max(E) + K)/2) print (max(E) + K)/2 max(E) + K max(E) max E K 2 main() main def main():
	N, K = [int(x) for x in input().split(" ")]
	P = [int(p) for p in input().split(" ")]
	E = [sum(P[:K])]
	for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	print((max(E) + K)/2) def main():
	N, K = [int(x) for x in input().split(" ")]
	P = [int(p) for p in input().split(" ")]
	E = [sum(P[:K])]
	for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	print((max(E) + K)/2) main
def main():
	N, K = [int(x) for x in input().split(" ")]
	P = [int(p) for p in input().split(" ")]
	E = [sum(P[:K])]
	for i in range(N - K):
		E.append(E[-1] - P[i] + P[i + K])
	print((max(E) + K)/2)

main()