#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define vec_input(v) for(auto it=v.begin();it!=v.end();it++){cin>>*it;}
#define vec_debug(v) for(auto it=v.begin();it!=v.end();it++){cerr<<*it<<" ";}cerr<<endl;
using namespace std;
using ll = long long;
template <typename T>T digitsum(T n);
template <typename T>bool isPrime(T n);
template <typename T>vector<pair<T, T>> prime_factor(T n);
long long int intpow(long long int,long long int);
template <typename T>T intlog(T);
long long int combination(long long int,long long int);
long long int series_sum(long long int);

int main(){
    int n,k;
    cin>>n>>k;
    vector<int> vec(n);
    vector<double> p(n);
    rep(i,n){
        cin>>vec[i];
        p[i]=(double)series_sum(vec[i])/vec[i];
    }
    double ans=0,value=0;
    rep(i,n){
        if(i<=k-1){
            value+=p[i];
            ans=value;
        }else{
            value+=p[i]-p[i-k];
            ans=max(ans,value);
        }
    }
    printf("%.8lf\n",ans);
}

/*int main(){
    int n;
    cin>>n;
    printf("%.8lf\n",(double)1/n);
}*/

/*int main(){
    int n;
    cin>>n;
    string s;
    cin>>s;
    ll ans=0;
    rep(i,n-1){
        if(s[i]==s[i+1])ans++;
    }
    cout<<ans<<endl;
}*/

/*int main(){
    unordered_map<ll,ll> map;
    unordered_set<ll> set;
    ll n;
    cin>>n;
    vector<ll> vec(n);
    rep(i,n){
        cin>>vec[i];
        if(set.count(vec[i])){
            map[vec[i]]++;
        }else{
            set.insert(vec[i]);
            map[vec[i]]=1;
        }
    }
    ll ans=0;
    for(auto it=set.begin();it!=set.end();it++){
        ans+=(ll)(map[*it]*(map[*it]-1))/2;
    }
    rep(i,n){
        cout<<ans-map[vec[i]]+1<<endl;
    }
}*/

long long int series_sum(long long int n){
    long long int ans=0;
    for(long long int i=1;i<=n;i++){
        ans+=i;
    }
    return ans;
}

long long int combination(long long int a,long long int b){
    queue<long long int> bunsi,bunbo;
    long long int ans=1;
    b=min(b,a-b);
    for(int i=0;i<b;i++){
        bunsi.push(a-i);
        if(b-i>=2)bunbo.push(b-i);
    }
    while(bunsi.size()!=0||bunbo.size()!=0){
        ans*=bunsi.front();
        bunsi.pop();
        if(ans%bunbo.front()==0){
            ans/=bunbo.front();
            bunbo.pop();
        }
    }
    return ans;
}

/*int main(){
    int a,b,m;
    cin>>a>>b>>m;
    vector<int> fri(a),ran(b);
    con_input(fri);
    con_input(ran);
    int x,y,c,minv;
    rep(i,m){
        cin>>x>>y>>c;
        if(i==0)minv=fri[x-1]+ran[y-1]-c;
        else{
            minv=min(minv,fri[x-1]+ran[y-1]-c);
        }
    }
    sort(all(fri));
    sort(all(ran));
    minv=min(minv,fri[0]+ran[0]);
    cout<<minv<<endl;
}*/

/*int main(){
    ll h;
    cin>>h;
    ll ans=0,d=1;
    while(h>=1){
        h/=2;
        ans+=d;
        d*=2;
    }
    cout<<ans<<endl;
}*/

/*int main(){
    int h,w,n;
    cin>>h>>w>>n;
    cout<<(int)floor((n+max(h,w)-1)/max(h,w))<<endl;
}*/

/*int main(){
    int a,b;
    cin>>a>>b;
    cout<<(a*b==15?"*":a+b==15?"+":"x")<<endl;
}*/

/*int main(){
    int n,d=0,x;
    cin>>n;
    vector<pair<string,int>> vec(n);
    string s,t;
    rep(i,n){
        cin>>t>>x;
        vec[i]=make_pair(t,x);
    }
    cin>>s;
    int ans=0;
    rep(i,n){
        if(d==1){
            ans+=vec[i].second;
        }
        if(vec[i].first==s){
            d=1;
        }
    }
    cout<<ans<<endl;
}*/

/*int main(){
    long long int a,b;
    cin>>a>>b;
    cout<<a*b/__gcd(a,b)<<endl;
}*/

/*int main(){
    int x,n,j=0;
    int ans=0;
    cin>>n;
    rep(i,n){
        cin>>x;
        if(x-1!=j){
            ans++;
        }else{
            j++;
        }
    }
    cout<<(ans==n?-1:ans)<<endl;
}*/

/*int main(){
    int m1,d1,m2,d2;
    cin>>m1>>d1>>m2>>d2;
    cout<<(m1!=m2?1:0)<<endl;
}*/

/*int main(){
    string s;
    string str;
    cin>>s;
    int ans=0,j;
    rep(i,s.length()){
        if(i==0){
            str=s.substr(0,1);
            ans++;
        }else{
            j=1;
            if(i==s.length()-1&&s.substr(i,j)==str)break;
            while(s.substr(i,j)==str){
                j++;
            }
            str=s.substr(i,j);
            i+=j-1;
            ans++;
        }
    }
    cout<<ans<<endl;
}*/

/*int main(){
    ll n,a,b,d1,d2;
    cin>>n>>a>>b;
    ll ans;
    if((b-a)%2==0)ans=(b-a)/2;
    else{
        d1=a-1;
        d2=n-b;
        ans=min(d1,d2)+1+(b-a-1)/2;
    }
    cout<<ans<<endl;
}*/

/*int main(){
    int n,ans=1,j;
    cin>>n;
    vector<int> vec(n);
    vector<bool> vec2(n,true);
    con_input(vec);
    rep(i,n-1){
        if(vec[i]-vec[i+1]>=2){
            ans=0;
            break;
        }
        if(vec[i]-vec[i+1]==1){
            vec[i]--;
            vec2[i]=false;
            j=i;
            while(j>=1&&vec[j-1]>vec[j]){
                if(vec2[j-1]){
                    vec[j-1]--;
                    vec2[j-1]=false;
                    j--;
                }else{
                    ans=0;
                    break;
                }
            }
        }
        if(ans==0)break;
    }
    cout<<(ans?"Yes":"No")<<endl;
}*/

/*int main(){
    string s;
    cin>>s;
    char c='2';
    int counter=0,ans=0;
    rep(i,s.length()){
        if(s[i]!=c){
            counter=1;
            c=s[i];
        }else{
            counter++;
            if(counter>=7){
                ans=1;
                break;
            }
        }
    }
    cout<<(ans?"YES":"NO")<<endl;
}*/

/*int main(){
    char s[100];
    int ans=1,a=0;
    fgets(s, 100, stdin);
    for(int i=0;s[i]!='\n';i++){
        if(i%2==0&&!(s[i]>='a'&&s[i]<='z')){
            ans=0;
            break;
        }
        if(i%2==1&&s[i]!=' '){
            ans=0;
            break;
        }
    }
    cout<<(ans?"Yes":"No")<<endl;
}*/

template <typename T>
T digitsum(T n){
    string s=to_string(n);
    T sum=0;
    T d=1;
    for(T e=0;e<s.length();e++){
        sum+=(n/d)%10;d*=10;
    }
    return sum;
}
template <typename T>
bool isPrime(T n){
    if(n<=1)return false;
    if(n==2)return true;
    if(n%2==0)return false;
    for(T q=3;q*q<=n;q+=2){
        if(n%q==0)return false;
    }
    return true;
}
template <typename T>
vector<pair<T, T>> prime_factor(T n) {
    vector<pair<T, T>> ret;
    if(n%2==0){
        T tmp = 0;
        while (n % 2 == 0) {
            tmp++;
            n /= 2;
        }
        ret.push_back(make_pair(2, tmp));
    }
    for (T i = 3; i*i <= n; i+=2) {
        if(n%i==0){
            T tmp = 0;
            while (n % i == 0) {
                tmp++;
                n /= i;
            }
            ret.push_back(make_pair( i, tmp));
        }
    }
    if (n != 1) ret.push_back(make_pair(n, 1));
    return ret;
}
long long int intpow(long long int x,long long int n){
    long long int ans=1;
    for(int i=0;i<n;i++){
        ans*=x;
    }
    return ans;
}
template <typename T>T intlog(T x){
    string a=to_string(x);
    return a.length()-1;
}

Measured memory_bytes: 2560