import scala.io.StdIn._
object Main extends App {
  def expect(i: Int): Double = {
    (1 to i).foldLeft(0d) { (a, b) =>
      a + (1d / i) * b.toDouble
    }
  }
  val Array(_, k) = readLine.split(" ").map(_.toInt)
  val res = readLine.split(" ").sliding(k).foldLeft(0d) { (a, b) =>
    val tmp = b.foldLeft(0d) { (a, b) =>
      a + expect(b.toInt)
    }
    math.max(a, tmp)
  }
  println(res)
}