#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];
  }
  double maxi = 0;
  for (int cl = k; cl <= n; cl++) {
    double x = 0;
    for (int i = 0; i < cl; i++) {
      x += arr[i] / ((double)(cl));
    }
    maxi = max(maxi, x);
    for (int i = 1; i < n - cl + 1; i++) {
      int j = i + cl - 1;
      x = x - arr[i - 1] / ((double)(cl)) + arr[j] / ((double)(cl));
      maxi = max(maxi, x);
    }
  }
  cout << setprecision(15) << maxi;
}
