n,k=map(int,input().split())
li=list(map(int,input().split()))
kai=[0]
for i in range(1,1001):
  kai.append(kai[i-1]+i)
ka=[0]+[kai[i]/i for i in range(1,len(kai))]
lis=[ka[i] for i in li]

ans=sum(lis[:k])
mx=ans
for i in range(len(li)-k):
  ans-=lis[i]
  ans+=lis[i+k]
  mx=max(ans,mx)
print(mx) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k li=list(map(int,input().split())) li list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split kai=[0] kai [0] 0 for i in range(1,1001):
  kai.append(kai[i-1]+i) i range(1,1001) range 1 1001 kai.append(kai[i-1]+i) kai.append kai append kai[i-1]+i kai[i-1] kai i-1 i 1 i kai[i]/i for i in range(1,len(kai)) for i in range(1,len(kai)) i range(1,len(kai)) range 1 len(kai) len kai for i in range(1,len(kai)) kai[i]/i kai[i] kai i i ka=[0]+[kai[i]/i for i in range(1,len(kai))] ka [0]+[kai[i]/i for i in range(1,len(kai))] [0] 0 [kai[i]/i for i in range(1,len(kai))] ka[i] for i in li for i in li i li for i in li ka[i] ka i lis=[ka[i] for i in li] lis [ka[i] for i in li] ans=sum(lis[:k]) ans sum(lis[:k]) sum lis[:k] lis :k k mx=ans mx ans for i in range(len(li)-k):
  ans-=lis[i]
  ans+=lis[i+k]
  mx=max(ans,mx) i range(len(li)-k) range len(li)-k len(li) len li k ans-=lis[i] ans lis[i] lis i ans+=lis[i+k] ans lis[i+k] lis i+k i k mx=max(ans,mx) mx max(ans,mx) max ans mx print(mx) print mx kai=[0] [0] kai lis=[ka[i] for i in li] [ka[i] for i in li] lis ans-=lis[i] lis[i] ans mx=ans ans mx k=map(int,input().split()) map(int,input().split()) k li=list(map(int,input().split())) list(map(int,input().split())) li ans+=lis[i+k] lis[i+k] ans mx=max(ans,mx) max(ans,mx) mx n,k=map(int,input().split()) map(int,input().split()) n ka=[0]+[kai[i]/i for i in range(1,len(kai))] [0]+[kai[i]/i for i in range(1,len(kai))] ka ans=sum(lis[:k]) sum(lis[:k]) ans
n,k=map(int,input().split())
li=list(map(int,input().split()))
kai=[0]
for i in range(1,1001):
  kai.append(kai[i-1]+i)
ka=[0]+[kai[i]/i for i in range(1,len(kai))]
lis=[ka[i] for i in li]

ans=sum(lis[:k])
mx=ans
for i in range(len(li)-k):
  ans-=lis[i]
  ans+=lis[i+k]
  mx=max(ans,mx)
print(mx)
