N, K = map(int, input().split())
pList = list(map(int, input().split()))
#範囲内の和を求めるには累積和とういうのを使う
#事前準備
cum_sum_list = [0]*(N+1)
cum_sum = 0
pListLen = len(pList)
for i in range(pListLen):
  cum_sum += pList[i]
  cum_sum_list[i+1] = cum_sum
#範囲内の和を比べていく
max_sumK = 0
max_start = 0
max_end = 0
for i in range(N-K+1):
  start = i
  end = (i+K)
  sumK = cum_sum_list[end] - cum_sum_list[start]
  if (sumK > max_sumK):
    max_sumK = sumK
    max_start = start
    max_end = end
#最大の期待値を計算して出力
answer = 0
for num in pList[max_start:max_end]:
  answer += sum(list(range(1, (num+1))))/num
print(answer) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K pList = list(map(int, input().split())) pList list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split cum_sum_list = [0]*(N+1) cum_sum_list [0]*(N+1) [0] 0 N+1 N 1 cum_sum = 0 cum_sum 0 pListLen = len(pList) pListLen len(pList) len pList for i in range(pListLen):
  cum_sum += pList[i]
  cum_sum_list[i+1] = cum_sum
#範囲内の和を比べていく i range(pListLen) range pListLen cum_sum += pList[i] cum_sum pList[i] pList i cum_sum_list[i+1] = cum_sum cum_sum_list[i+1] cum_sum_list i+1 i 1 cum_sum max_sumK = 0 max_sumK 0 max_start = 0 max_start 0 max_end = 0 max_end 0 for i in range(N-K+1):
  start = i
  end = (i+K)
  sumK = cum_sum_list[end] - cum_sum_list[start]
  if (sumK > max_sumK):
    max_sumK = sumK
    max_start = start
    max_end = end
#最大の期待値を計算して出力 i range(N-K+1) range N-K+1 N-K N K 1 start = i start i end = (i+K) end i+K i K sumK = cum_sum_list[end] - cum_sum_list[start] sumK cum_sum_list[end] - cum_sum_list[start] cum_sum_list[end] cum_sum_list end cum_sum_list[start] cum_sum_list start if (sumK > max_sumK):
    max_sumK = sumK
    max_start = start
    max_end = end
#最大の期待値を計算して出力 sumK > max_sumK sumK max_sumK max_sumK = sumK max_sumK sumK max_start = start max_start start max_end = end max_end end answer = 0 answer 0 for num in pList[max_start:max_end]:
  answer += sum(list(range(1, (num+1))))/num num pList[max_start:max_end] pList max_start:max_end max_start max_end answer += sum(list(range(1, (num+1))))/num answer sum(list(range(1, (num+1))))/num sum(list(range(1, (num+1)))) sum list(range(1, (num+1))) list range(1, (num+1)) range 1 num+1 num 1 num print(answer) print answer max_end = end end max_end cum_sum_list = [0]*(N+1) [0]*(N+1) cum_sum_list sumK = cum_sum_list[end] - cum_sum_list[start] cum_sum_list[end] - cum_sum_list[start] sumK start = i i start cum_sum = 0 0 cum_sum pListLen = len(pList) len(pList) pListLen max_end = 0 0 max_end answer = 0 0 answer max_start = 0 0 max_start max_start = start start max_start max_sumK = sumK sumK max_sumK N, K = map(int, input().split()) map(int, input().split()) N answer += sum(list(range(1, (num+1))))/num sum(list(range(1, (num+1))))/num answer max_sumK = 0 0 max_sumK pList = list(map(int, input().split())) list(map(int, input().split())) pList cum_sum += pList[i] pList[i] cum_sum end = (i+K) i+K end K = map(int, input().split()) map(int, input().split()) K
N, K = map(int, input().split())
pList = list(map(int, input().split()))
#範囲内の和を求めるには累積和とういうのを使う
#事前準備
cum_sum_list = [0]*(N+1)
cum_sum = 0
pListLen = len(pList)
for i in range(pListLen):
  cum_sum += pList[i]
  cum_sum_list[i+1] = cum_sum
#範囲内の和を比べていく
max_sumK = 0
max_start = 0
max_end = 0
for i in range(N-K+1):
  start = i
  end = (i+K)
  sumK = cum_sum_list[end] - cum_sum_list[start]
  if (sumK > max_sumK):
    max_sumK = sumK
    max_start = start
    max_end = end
#最大の期待値を計算して出力
answer = 0
for num in pList[max_start:max_end]:
  answer += sum(list(range(1, (num+1))))/num
print(answer)
