object Main extends App {
  val Array(n, k) = io.StdIn.readLine().split(' ').map(_.toInt)
  val pn = io.StdIn.readLine().split(' ').map(_.toInt)
  var max: Double = 0
  var l = Array.empty[Int]
  for (i <- 0 to n-k) {
    val sub = pn.slice(i, i+k)
    val sum = sub.sum
    if (max < sum) {max = sum; l = sub}
  }

  val exp = l.map(x => (1 to x).sum / x.toDouble).sum
  println(exp)
}