N,K=map(int,input().split())

P=list(map(int,input().split()))

probability=[]
sums=[0]
total=0
for i in range(N):
    num=0
    prob=1/P[i]
    for j in range(1,P[i]+1):
        num+=j*prob
    probability.append(num)
    total+=num
    sums.append(total)

ans=0
for j in range(N-K+1):
    if ans<sums[j+K]-sums[j]:
        ans=sums[j+K]-sums[j]

print('{:.012f}'.format(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 probability=[] probability [] sums=[0] sums [0] 0 total=0 total 0 for i in range(N):
    num=0
    prob=1/P[i]
    for j in range(1,P[i]+1):
        num+=j*prob
    probability.append(num)
    total+=num
    sums.append(total) i range(N) range N num=0 num 0 prob=1/P[i] prob 1/P[i] 1 P[i] P i for j in range(1,P[i]+1):
        num+=j*prob
     j range(1,P[i]+1) range 1 P[i]+1 P[i] P i 1 num+=j*prob num j*prob j prob probability.append(num) probability.append probability append num total+=num total num sums.append(total) sums.append sums append total ans=0 ans 0 for j in range(N-K+1):
    if ans<sums[j+K]-sums[j]:
        ans=sums[j+K]-sums[j] j range(N-K+1) range N-K+1 N-K N K 1 if ans<sums[j+K]-sums[j]:
        ans=sums[j+K]-sums[j] ans<sums[j+K]-sums[j] ans sums[j+K]-sums[j] sums[j+K] sums j+K j K sums[j] sums j ans=sums[j+K]-sums[j] ans sums[j+K]-sums[j] sums[j+K] sums j+K j K sums[j] sums j print('{:.012f}'.format(ans)) print '{:.012f}'.format(ans) '{:.012f}'.format '{:.012f}' format ans num+=j*prob j*prob num total+=num num total ans=sums[j+K]-sums[j] sums[j+K]-sums[j] ans prob=1/P[i] 1/P[i] prob ans=0 0 ans N,K=map(int,input().split()) map(int,input().split()) N K=map(int,input().split()) map(int,input().split()) K probability=[] [] probability num=0 0 num P=list(map(int,input().split())) list(map(int,input().split())) P sums=[0] [0] sums total=0 0 total
N,K=map(int,input().split())

P=list(map(int,input().split()))

probability=[]
sums=[0]
total=0
for i in range(N):
    num=0
    prob=1/P[i]
    for j in range(1,P[i]+1):
        num+=j*prob
    probability.append(num)
    total+=num
    sums.append(total)

ans=0
for j in range(N-K+1):
    if ans<sums[j+K]-sums[j]:
        ans=sums[j+K]-sums[j]

print('{:.012f}'.format(ans))