n, k = map(int, input().split())
arr = list(map(int, input().split()))
expected = []
cumsum = []
for x in arr:
	sum = (x * (x + 1)) // 2
	ex = sum / x
	expected.append(ex)

sum = 0
maxi = 0
taken = 0
bad = 0
for x in expected:
	sum += x
	taken += 1
	if taken == k:
		 maxi = max(maxi, sum)
	elif taken > k:
		sum -= expected[bad]
		bad += 1
		maxi = max(maxi, sum)
print(maxi) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k arr = list(map(int, input().split())) arr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split expected = [] expected [] cumsum = [] cumsum [] for x in arr:
	sum = (x * (x + 1)) // 2
	ex = sum / x
	expected.append(ex) x arr sum = (x * (x + 1)) // 2 sum (x * (x + 1)) // 2 x * (x + 1) x x + 1 x 1 2 ex = sum / x ex sum / x sum x expected.append(ex) expected.append expected append ex sum = 0 sum 0 maxi = 0 maxi 0 taken = 0 taken 0 bad = 0 bad 0 for x in expected:
	sum += x
	taken += 1
	if taken == k:
		 maxi = max(maxi, sum)
	elif taken > k:
		sum -= expected[bad]
		bad += 1
		maxi = max(maxi, sum) x expected sum += x sum x taken += 1 taken 1 if taken == k:
		 maxi = max(maxi, sum)
	elif taken > k:
		sum -= expected[bad]
		bad += 1
		maxi = max(maxi, sum) taken == k taken k maxi = max(maxi, sum) maxi max(maxi, sum) max maxi sum elif taken > k:
		sum -= expected[bad]
		bad += 1
		maxi = max(maxi, sum) taken > k taken k sum -= expected[bad] sum expected[bad] expected bad bad += 1 bad 1 maxi = max(maxi, sum) maxi max(maxi, sum) max maxi sum print(maxi) print maxi maxi = max(maxi, sum) max(maxi, sum) maxi taken = 0 0 taken sum = 0 0 sum k = map(int, input().split()) map(int, input().split()) k ex = sum / x sum / x ex sum += x x sum taken += 1 1 taken bad += 1 1 bad cumsum = [] [] cumsum sum -= expected[bad] expected[bad] sum maxi = max(maxi, sum) max(maxi, sum) maxi expected = [] [] expected arr = list(map(int, input().split())) list(map(int, input().split())) arr maxi = 0 0 maxi n, k = map(int, input().split()) map(int, input().split()) n sum = (x * (x + 1)) // 2 (x * (x + 1)) // 2 sum bad = 0 0 bad
n, k = map(int, input().split())
arr = list(map(int, input().split()))
expected = []
cumsum = []
for x in arr:
	sum = (x * (x + 1)) // 2
	ex = sum / x
	expected.append(ex)

sum = 0
maxi = 0
taken = 0
bad = 0
for x in expected:
	sum += x
	taken += 1
	if taken == k:
		 maxi = max(maxi, sum)
	elif taken > k:
		sum -= expected[bad]
		bad += 1
		maxi = max(maxi, sum)
print(maxi)