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