import scala.io.StdIn.readLine

object Main extends App {

  val Array(n, k) = readLine().split(" ").map(_.toInt)
  val xs = readLine().split(" ").view.map(_.toInt)
  val ys = xs.sliding(k).maxBy(_.sum)

  val s = ys.map(1 to _).map(zs => zs.sum / zs.length.toDouble).sum

  println(s)

  
}
