N,K=map(int,input().split())
List = list(map(int, input().split()))
INF = 10000000000
expList = [INF]*1001
def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num]

res = 0
mid = 0
midList=[]
for i in range(N):
  if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i]))
m=K-1
for j in range(N-m):
  if j == 0:
    mid = midList[j+m]
  else:
    mid = midList[j+m]- midList[j-1] 
  res = max(res,mid)
print(res) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K List = list(map(int, input().split())) List list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split INF = 10000000000 INF 10000000000 expList = [INF]*1001 expList [INF]*1001 [INF] INF 1001 def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num] expectationF if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
   expList[num] == INF expList[num] expList num INF exp = 0 exp 0 for i in range(1,num+1):
      exp += i/num
     i range(1,num+1) range 1 num+1 num 1 exp += i/num exp i/num i num expList[num] = exp expList[num] expList num exp return expList[num] expList[num] expList num num num res = 0 res 0 mid = 0 mid 0 midList=[] midList [] for i in range(N):
  if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i])) i range(N) range N if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i])) i>=1 i 1 midList.append(expectationF(List[i])+midList[i-1]) midList.append midList append expectationF(List[i])+midList[i-1] expectationF(List[i]) expectationF List[i] List i midList[i-1] midList i-1 i 1 midList.append(expectationF(List[i])) midList.append midList append expectationF(List[i]) expectationF List[i] List i m=K-1 m K-1 K 1 for j in range(N-m):
  if j == 0:
    mid = midList[j+m]
  else:
    mid = midList[j+m]- midList[j-1] 
  res = max(res,mid) j range(N-m) range N-m N m if j == 0:
    mid = midList[j+m]
  else:
    mid = midList[j+m]- midList[j-1] 
   j == 0 j 0 mid = midList[j+m] mid midList[j+m] midList j+m j m mid = midList[j+m]- midList[j-1] mid midList[j+m]- midList[j-1] midList[j+m] midList j+m j m midList[j-1] midList j-1 j 1 res = max(res,mid) res max(res,mid) max res mid print(res) print res res = 0 0 res mid = 0 0 mid List = list(map(int, input().split())) list(map(int, input().split())) List K=map(int,input().split()) map(int,input().split()) K m=K-1 K-1 m mid = midList[j+m]- midList[j-1] midList[j+m]- midList[j-1] mid mid = midList[j+m] midList[j+m] mid midList=[] [] midList expList = [INF]*1001 [INF]*1001 expList N,K=map(int,input().split()) map(int,input().split()) N res = max(res,mid) max(res,mid) res def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num] def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num] expectationF INF = 10000000000 10000000000 INF
N,K=map(int,input().split())
List = list(map(int, input().split()))
INF = 10000000000
expList = [INF]*1001
def expectationF(num):
  if expList[num] == INF:
    exp = 0
    for i in range(1,num+1):
      exp += i/num
    expList[num] = exp
  return expList[num]

res = 0
mid = 0
midList=[]
for i in range(N):
  if i>=1:
    midList.append(expectationF(List[i])+midList[i-1])
  else:
    midList.append(expectationF(List[i]))
m=K-1
for j in range(N-m):
  if j == 0:
    mid = midList[j+m]
  else:
    mid = midList[j+m]- midList[j-1] 
  res = max(res,mid)
print(res)