import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()
    val p = (0 until n).map {
        sc.next().toLong()
    }

    abc154d(n, k, p)
}

fun abc154d(n: Int, k: Int, p: List<Long>) {
    val list = DoubleArray(n + 1) { 0.0 }
    for (i in 0 until n) {
        val pi = p.get(i)
        list[i + 1] = list[i] + (sum(pi) / pi)
    }

    var ans = 0.0
    for (i in 0..n - k) {
        val temp = list[i + k] - list[i]
        if (temp > ans) ans = temp
    }

    println(ans)
}

private fun sum(pi: Long): Double {
    var sum = 0.0
    for (i in 1..pi) {
        sum += i
    }
    return sum
}