#include <iostream>
#include <iomanip>
#define endl '\n'
using namespace std;

const int MAXN = 300000;

int a[MAXN + 5];
long long pref[MAXN + 5];

int main()
{
    ios :: sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    int n, k;
    cin >> n >> k;

    for (int i = 1; i <= n; ++ i)
    {
        cin >> a[i];
        pref[i] = pref[i - 1] + a[i];
    }

    int l = 1, r = k - 1;
    long double ans = 0.0;
    long long sum = pref[k - 1];
    while (r < n)
    {
        r++;
        sum += a[r];
        while (r < n and (long double)(1.0 * sum / (r - l + 1)) <= (long double)(1.0 * (sum + a[r + 1]) / (r - l + 2)))
        {
            r++;
            sum += a[r];
        }
        ans = max(ans, (long double)(1.0 * sum / (r - l + 1)));
        while (r - l + 1 > k and (long double)(1.0 * sum / (r - l + 1)) <= (long double)(1.0 * (sum - a[l]) / (r - l)))
        {
            sum -= a[l];
            l++;
        }
        ans = max(ans, (long double)(1.0 * sum / (r - l + 1)));
    }

    cout << fixed << setprecision(6) << ans << endl;

    return 0;
}
