n,k = map(int,input().split())

p = [int(x) for x in input().split()]

sum1 = sum(p[:k])
num = k-1
max1 = sum1

for i in range(k,n):
    sum1 = sum1 - p[i-k] + p[i]
    if sum1 >= max1:
        max1 = sum1
        num = i
    #print(max1,sum1,i)

sum2 = sum(p[num-k+1:num+1])

def goukei(j):
    return 1/2 * j * (j+1)

print(float((goukei(sum2)-goukei(k-1))/(sum2 -k +1))) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x p = [int(x) for x in input().split()] p [int(x) for x in input().split()] sum1 = sum(p[:k]) sum1 sum(p[:k]) sum p[:k] p :k k num = k-1 num k-1 k 1 max1 = sum1 max1 sum1 for i in range(k,n):
    sum1 = sum1 - p[i-k] + p[i]
    if sum1 >= max1:
        max1 = sum1
        num = i
    #print(max1,sum1,i) i range(k,n) range k n sum1 = sum1 - p[i-k] + p[i] sum1 sum1 - p[i-k] + p[i] sum1 - p[i-k] sum1 p[i-k] p i-k i k p[i] p i if sum1 >= max1:
        max1 = sum1
        num = i
    #print(max1,sum1,i) sum1 >= max1 sum1 max1 max1 = sum1 max1 sum1 num = i num i sum2 = sum(p[num-k+1:num+1]) sum2 sum(p[num-k+1:num+1]) sum p[num-k+1:num+1] p num-k+1:num+1 num-k+1 num-k num k 1 num+1 num 1 def goukei(j):
    return 1/2 * j * (j+1) goukei return 1/2 * j * (j+1) 1/2 * j * (j+1) 1/2 * j 1/2 1 2 j j+1 j 1 j j print(float((goukei(sum2)-goukei(k-1))/(sum2 -k +1))) print float((goukei(sum2)-goukei(k-1))/(sum2 -k +1)) float (goukei(sum2)-goukei(k-1))/(sum2 -k +1) goukei(sum2)-goukei(k-1) goukei(sum2) goukei sum2 goukei(k-1) goukei k-1 k 1 sum2 -k +1 sum2 -k sum2 k 1 sum2 = sum(p[num-k+1:num+1]) sum(p[num-k+1:num+1]) sum2 max1 = sum1 sum1 max1 k = map(int,input().split()) map(int,input().split()) k sum1 = sum(p[:k]) sum(p[:k]) sum1 num = k-1 k-1 num sum1 = sum1 - p[i-k] + p[i] sum1 - p[i-k] + p[i] sum1 max1 = sum1 sum1 max1 def goukei(j):
    return 1/2 * j * (j+1) def goukei(j):
    return 1/2 * j * (j+1) goukei num = i i num n,k = map(int,input().split()) map(int,input().split()) n p = [int(x) for x in input().split()] [int(x) for x in input().split()] p
n,k = map(int,input().split())

p = [int(x) for x in input().split()]

sum1 = sum(p[:k])
num = k-1
max1 = sum1

for i in range(k,n):
    sum1 = sum1 - p[i-k] + p[i]
    if sum1 >= max1:
        max1 = sum1
        num = i
    #print(max1,sum1,i)

sum2 = sum(p[num-k+1:num+1])

def goukei(j):
    return 1/2 * j * (j+1)

print(float((goukei(sum2)-goukei(k-1))/(sum2 -k +1)))
