n,k = map(int, input().split())
p = list(map(int, input().split()))

kitai = [(1+p[i])/2 for i in range(n)]

total = sum(kitai[i] for i in range(k))
ans = total

for i in range(0, n-k):
  total = total - kitai[i] + kitai[i+k]
  if total > ans:
    ans = total

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 (1+p[i])/2 for i in range(n) for i in range(n) i range(n) range n for i in range(n) (1+p[i])/2 1+p[i] 1 p[i] p i 2 kitai = [(1+p[i])/2 for i in range(n)] kitai [(1+p[i])/2 for i in range(n)] total = sum(kitai[i] for i in range(k)) total sum(kitai[i] for i in range(k)) sum kitai[i] kitai i ans = total ans total for i in range(0, n-k):
  total = total - kitai[i] + kitai[i+k]
  if total > ans:
    ans = total i range(0, n-k) range 0 n-k n k total = total - kitai[i] + kitai[i+k] total total - kitai[i] + kitai[i+k] total - kitai[i] total kitai[i] kitai i kitai[i+k] kitai i+k i k if total > ans:
    ans = total total > ans total ans ans = total ans total print(ans) print ans p = list(map(int, input().split())) list(map(int, input().split())) p total = total - kitai[i] + kitai[i+k] total - kitai[i] + kitai[i+k] total k = map(int, input().split()) map(int, input().split()) k ans = total total ans kitai = [(1+p[i])/2 for i in range(n)] [(1+p[i])/2 for i in range(n)] kitai n,k = map(int, input().split()) map(int, input().split()) n ans = total total ans total = sum(kitai[i] for i in range(k)) sum(kitai[i] for i in range(k)) total
n,k = map(int, input().split())
p = list(map(int, input().split()))

kitai = [(1+p[i])/2 for i in range(n)]

total = sum(kitai[i] for i in range(k))
ans = total

for i in range(0, n-k):
  total = total - kitai[i] + kitai[i+k]
  if total > ans:
    ans = total

print(ans)