'use strict'

const fact = (n) => {
  if (n === 1) 1
  return n + fact(n - 1)
}

function Main(input) {
  input = input.trim().split('\n')
  const array = input[0].split(' ').map(s => parseInt(s))
  const N = array[0]
  const K = array[1]

  let A = input[1].split(' ').map(s => parseInt(s))

  let dp = {}
  // 各値の期待値を計算する

  let memo = []
  memo[0] = 0
  for(let i = 1; i < 1000; ++i) {
    memo[i] = memo[i - 1] + i
  }

  let result = 0

  // 前から順番に組み合わせる
  for (let i = 0; i < N - (K - 1); ++i) {

    let total = 0
    for(let j = i; j < i + K; ++j) {
      total += memo[A[j]] * 1/A[j]
    }

    // console.log(total)

    result = Math.max(total, result)
  }

  console.log(result.toFixed(12))
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));