import scala.io.StdIn._

object Main  {
  def main(args: Array[String]): Unit = {
    val K = readToInts()(1)
    val dice = readToInts()
    println(solve(K, dice))
  }

  def solve(K: Int, dice: Array[Int]): Double = {
    Iterator.iterate(0)(n => n + 1)
      .takeWhile(n => n <= dice.length - K)
      .map(n => dice.slice(n, K + n))
      .toList
      .map(list => list.foldLeft(0d)((total, next) => total + ((next + 1) / 2.0)))
      .max
  }

  def readToInts(): Array[Int] = readLine.split(" ").map(_.toInt)
  def readToListInts(): List[Int] = readLine.split(" ").map(_.toInt).toList
  def readToVectorInts(): Vector[Int] = readLine.split(" ").map(_.toInt).toVector

}