n, k = map(int, input().split())
P = list(map(int, input().split()))
ans = 0
E = []

for p in P:
    E.append(p*(p+1)/(2*p))

cumsumE = [0]
for e in E:
    cumsumE.append(cumsumE[-1] + e)

for i in range(0, n+1-k):
    ans = max(ans, cumsumE[i+k]-cumsumE[i])
print(ans) n, k = map(int, input().split()) n 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 ans = 0 ans 0 E = [] E [] for p in P:
    E.append(p*(p+1)/(2*p)) p P E.append(p*(p+1)/(2*p)) E.append E append p*(p+1)/(2*p) p*(p+1) p p+1 p 1 2*p 2 p cumsumE = [0] cumsumE [0] 0 for e in E:
    cumsumE.append(cumsumE[-1] + e) e E cumsumE.append(cumsumE[-1] + e) cumsumE.append cumsumE append cumsumE[-1] + e cumsumE[-1] cumsumE -1 e for i in range(0, n+1-k):
    ans = max(ans, cumsumE[i+k]-cumsumE[i]) i range(0, n+1-k) range 0 n+1-k n+1 n 1 k ans = max(ans, cumsumE[i+k]-cumsumE[i]) ans max(ans, cumsumE[i+k]-cumsumE[i]) max ans cumsumE[i+k]-cumsumE[i] cumsumE[i+k] cumsumE i+k i k cumsumE[i] cumsumE i print(ans) print ans cumsumE = [0] [0] cumsumE P = list(map(int, input().split())) list(map(int, input().split())) P E = [] [] E ans = 0 0 ans k = map(int, input().split()) map(int, input().split()) k ans = max(ans, cumsumE[i+k]-cumsumE[i]) max(ans, cumsumE[i+k]-cumsumE[i]) ans n, k = map(int, input().split()) map(int, input().split()) n
n, k = map(int, input().split())
P = list(map(int, input().split()))
ans = 0
E = []

for p in P:
    E.append(p*(p+1)/(2*p))

cumsumE = [0]
for e in E:
    cumsumE.append(cumsumE[-1] + e)

for i in range(0, n+1-k):
    ans = max(ans, cumsumE[i+k]-cumsumE[i])
print(ans)