n,k=map(int,input().split())
c=list(map(int,input().split()))
a=[]
for x in range(n):
  s=c[x]
  t=(s+1)/2
  a.append(t)
  
ans=0
b=[]
b.append(a[0])

for y in range(n-1):
  c=b[y]
  d=b[y]+a[y+1]
  b.append(d)
  
dd=b[k-1]
for z in range(1,n+1-k):
  e=b[z+k-1]-b[z-1]
  
  dd=max(dd,e)

print(dd) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k c=list(map(int,input().split())) c list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a=[] a [] for x in range(n):
  s=c[x]
  t=(s+1)/2
  a.append(t)
   x range(n) range n s=c[x] s c[x] c x t=(s+1)/2 t (s+1)/2 s+1 s 1 2 a.append(t) a.append a append t ans=0 ans 0 b=[] b [] b.append(a[0]) b.append b append a[0] a 0 for y in range(n-1):
  c=b[y]
  d=b[y]+a[y+1]
  b.append(d)
   y range(n-1) range n-1 n 1 c=b[y] c b[y] b y d=b[y]+a[y+1] d b[y]+a[y+1] b[y] b y a[y+1] a y+1 y 1 b.append(d) b.append b append d dd=b[k-1] dd b[k-1] b k-1 k 1 for z in range(1,n+1-k):
  e=b[z+k-1]-b[z-1]
  
  dd=max(dd,e) z range(1,n+1-k) range 1 n+1-k n+1 n 1 k e=b[z+k-1]-b[z-1] e b[z+k-1]-b[z-1] b[z+k-1] b z+k-1 z+k z k 1 b[z-1] b z-1 z 1 dd=max(dd,e) dd max(dd,e) max dd e print(dd) print dd a=[] [] a d=b[y]+a[y+1] b[y]+a[y+1] d k=map(int,input().split()) map(int,input().split()) k dd=max(dd,e) max(dd,e) dd e=b[z+k-1]-b[z-1] b[z+k-1]-b[z-1] e b=[] [] b s=c[x] c[x] s c=b[y] b[y] c dd=b[k-1] b[k-1] dd t=(s+1)/2 (s+1)/2 t c=list(map(int,input().split())) list(map(int,input().split())) c ans=0 0 ans n,k=map(int,input().split()) map(int,input().split()) n
n,k=map(int,input().split())
c=list(map(int,input().split()))
a=[]
for x in range(n):
  s=c[x]
  t=(s+1)/2
  a.append(t)
  
ans=0
b=[]
b.append(a[0])

for y in range(n-1):
  c=b[y]
  d=b[y]+a[y+1]
  b.append(d)
  
dd=b[k-1]
for z in range(1,n+1-k):
  e=b[z+k-1]-b[z-1]
  
  dd=max(dd,e)

print(dd)