#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  double arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int i = 0;
  int j = i + k - 1;
  double max = 0;
  int dp[n];
  dp[0] = arr[0];
  for (int i = 1; i < n; i++) {
    dp[i] = dp[i - 1] + arr[i];
  }
  while (i <= j && j < n && i < n) {
    double sum = 0;
    sum = sum + dp[j] - dp[i] + arr[i];
    sum = sum / (j - i + 1);
    if (sum - max > 0.000000001) max = sum;
    if (j == n - 1) {
      i++;
      j = i + k - 1;
    } else
      j++;
  }
  printf("%.15f", max);
}
