import java.util.Scanner

fun main(args: Array<String>) {
	val scn = Scanner(System.`in`)
	val n = scn.nextInt()
	val k = scn.nextInt()
	val ps = IntArray(n){scn.nextInt()}
	var sum = 0
	for (i in 0 until k){
		sum += ps[i]
	}
	var max = Pair(0, sum)
	for (i in k until ps.size){
		sum -= ps[i-k]
		sum += ps[i]
		if (sum>max.second){
			max = Pair(i-k+1, sum)
		}
	}
	print((max.first until max.first+k).sumByDouble { (ps[it]+1.0)/2 })
}