"use strict";
function main(input) {
  let a = input[0].split(" ");
  a = a[1];
  let n = input[1].split(" ");
  let exp = [];
  for(let i=0;i<n.length;i++){
    exp[i]=0;
    for(let j=1;j<=n[i];j++){
      exp[i] += j / n[i];
    }
  }
  let max = 0;
  for(let i=a-1;i<n.length;i++){
    let max_n = 0;
    for(let j=0;j<a;j++){
      max_n += exp[i-j];
    }
    if(max_n > max){
      max = max_n;
    }
  }
  console.log(max);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));