N,K=map(int,input().split())
P=list(map(int,input().split()))
L=[]
M=[0]
c=0
m=0
x=0
for i in range(200100):
    c+=i
    L.append(c)
for i in P:
    m+=L[i]/i
    M.append(m)
if N!=K:
    for i in range(N-K+1):
        x=max(M[K+i]-M[i],x)
else:
    x=M[K]-M[0]
print(x) 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 L=[] L [] M=[0] M [0] 0 c=0 c 0 m=0 m 0 x=0 x 0 for i in range(200100):
    c+=i
    L.append(c) i range(200100) range 200100 c+=i c i L.append(c) L.append L append c for i in P:
    m+=L[i]/i
    M.append(m) i P m+=L[i]/i m L[i]/i L[i] L i i M.append(m) M.append M append m if N!=K:
    for i in range(N-K+1):
        x=max(M[K+i]-M[i],x)
else:
    x=M[K]-M[0] N!=K N K for i in range(N-K+1):
        x=max(M[K+i]-M[i],x) i range(N-K+1) range N-K+1 N-K N K 1 x=max(M[K+i]-M[i],x) x max(M[K+i]-M[i],x) max M[K+i]-M[i] M[K+i] M K+i K i M[i] M i x x=M[K]-M[0] x M[K]-M[0] M[K] M K M[0] M 0 print(x) print x m+=L[i]/i L[i]/i m x=max(M[K+i]-M[i],x) max(M[K+i]-M[i],x) x x=M[K]-M[0] M[K]-M[0] x N,K=map(int,input().split()) map(int,input().split()) N c+=i i c M=[0] [0] M L=[] [] L c=0 0 c K=map(int,input().split()) map(int,input().split()) K x=0 0 x m=0 0 m P=list(map(int,input().split())) list(map(int,input().split())) P
N,K=map(int,input().split())
P=list(map(int,input().split()))
L=[]
M=[0]
c=0
m=0
x=0
for i in range(200100):
    c+=i
    L.append(c)
for i in P:
    m+=L[i]/i
    M.append(m)
if N!=K:
    for i in range(N-K+1):
        x=max(M[K+i]-M[i],x)
else:
    x=M[K]-M[0]
print(x)