#include <bits/stdc++.h>
using namespace std;
const int MAX = 300000;
bool downwards(int a, int b){
    return a>b;
}
long long n, k, a[MAX], sum[MAX], bestStart;
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin>>n>>k;
for(int i=0;i<n;i++){
    cin>>a[i];
    if(i==0){
        sum[i]=a[i];
    }else{
        sum[i]=sum[i-1]+a[i];
    }
}
double res=0;
for(int j=k;j<k+100;j++){
    long long bestSum=sum[k-1];
    for(int i=k;i<n;i++){
        if(sum[i]-sum[i-k]>bestSum){
            bestSum=sum[i]-sum[i-k];
            bestStart=i-k+1;
        }
    }
    vector <int> bestStart;
    for(int i=k;i<n;i++){
        if(sum[i]-sum[i-k]==bestSum){
            bestStart.push_back(i-k+1);
        }
    }
    double finalAns=0;
    for(int j=0;j<bestStart.size();j++){
        double averageToBeat = (double)bestSum / k;
        double bestLowerAverage=-1, bestUpperAverage=-1;
        int num=1, bestLowerNum, bestUpperNum;
        long long currSum=0;
        for(int i=bestStart[j]-1;i>=0;i--){
            if(num>=k){
                break;
            }
            currSum = currSum + a[i];
            if((double)currSum / num >bestLowerAverage){
                bestLowerAverage = (double)currSum / num;
                bestLowerNum = num;
            }
            num++;
        }
        num=1;
        currSum=0;
        for(int i=bestStart[j]+k;i<n;i++){
            if(num>=k){
                break;
            }
            currSum = currSum + a[i];
            if((double)currSum / num >bestUpperAverage){
                bestUpperAverage = (double)currSum / num;
                bestUpperNum = num;
            }
            num++;
        }
        int finalNum=k;
        double ans = averageToBeat;
        if(bestLowerAverage>bestUpperAverage){
            if(bestLowerAverage>averageToBeat){
                finalNum += bestLowerNum;
                ans = (bestLowerNum*bestLowerAverage + k*averageToBeat)/(finalNum);
            }
            if(bestUpperAverage>ans){
                ans = (ans*finalNum + bestUpperNum*bestUpperAverage)/(finalNum+bestUpperNum);
            }
        }else{
            if(bestUpperAverage>averageToBeat){
                finalNum += bestUpperNum;
                ans = (bestUpperNum*bestUpperAverage + k*averageToBeat)/(finalNum);
            }
            if(bestLowerAverage>ans){
                ans = (ans*finalNum + bestLowerNum*bestLowerAverage)/(finalNum+bestLowerNum);
            }
        }
        if(ans>finalAns){
            finalAns=ans;
        }
    }
    if(finalAns>res){
        res=finalAns;
    }
}
cout<<setprecision(10)<<res;
return 0;
}
