object Main extends App {
  val Array(n, k) = io.StdIn.readLine().split(' ').map(_.toInt)
  val pn = io.StdIn.readLine().split(' ').map(_.toInt)
  var max = 0
  var start = 0
  var end = 0
  for (i <- 0 to n-k) {
    var sum = 0
    for (j <- i until i+k) sum += pn(j)
    if (max < sum) {max = sum; start = i; end = i+k}
  }

  val exp = pn.slice(start,end).map(x => (1 to x).sum / x.toDouble).sum
  println(exp)
}