n,k = map(int,input().split())
lst = list(map(int,input().split()))
E = [0]
for x in lst:
  E.append((1+x)/2+E[-1])
s = 0
for i in range(n+1-k):
  if s < E[i+k] - E[i]:
    s = E[i+k] - E[i]
print(s)     n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k lst = list(map(int,input().split())) lst list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split E = [0] E [0] 0 for x in lst:
  E.append((1+x)/2+E[-1]) x lst E.append((1+x)/2+E[-1]) E.append E append (1+x)/2+E[-1] (1+x)/2 1+x 1 x 2 E[-1] E -1 s = 0 s 0 for i in range(n+1-k):
  if s < E[i+k] - E[i]:
    s = E[i+k] - E[i] i range(n+1-k) range n+1-k n+1 n 1 k if s < E[i+k] - E[i]:
    s = E[i+k] - E[i] s < E[i+k] - E[i] s E[i+k] - E[i] E[i+k] E i+k i k E[i] E i s = E[i+k] - E[i] s E[i+k] - E[i] E[i+k] E i+k i k E[i] E i print(s) print s s = E[i+k] - E[i] E[i+k] - E[i] s s = 0 0 s lst = list(map(int,input().split())) list(map(int,input().split())) lst E = [0] [0] E n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k
n,k = map(int,input().split())
lst = list(map(int,input().split()))
E = [0]
for x in lst:
  E.append((1+x)/2+E[-1])
s = 0
for i in range(n+1-k):
  if s < E[i+k] - E[i]:
    s = E[i+k] - E[i]
print(s)    