import java.util.*

fun main(args: Array<String>) {
    val (n, k) = getInts()
    val input = getInts()
    val sum = LongArray(1001)
    sum[0] = 0
    (1..1000).forEach { sum[it] = it + sum[it - 1] }

    var current = 0.0

    (0 until k).forEach {
        current += (sum[input[it]] / input[it].toDouble())
    }

    var maxi = current

    var i = 0
    (k until n).forEach {
        current += (sum[input[it]] / input[it].toDouble())
        current -= (sum[input[i]] / input[i].toDouble())
        i++
        maxi = Math.max(maxi, current)
    }
    println(maxi)
}

fun getInt() = readLine()!!.toInt()
fun getInts() = readLine()!!.split(" ").map { it.toInt() }
fun getLong() = readLine()!!.toLong()
fun getLongs() = readLine()!!.split(" ").map { it.toLong() }
