#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;

#define rep(i,N) for(int i=0;i<(int)(N);++i)
#define rrep(i,N) for(int i=(int)(N)-1;i>=0;--i)
#define debug(x) cout<<#x<<"="<<x<<endl;
constexpr ll MOD=1000000007;
constexpr ll INF=(1LL<<61)-1;
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<typename T> void fail(T v){cout << v << endl;exit(0);}
//template end

void solve(){
    int N,W;
    while((cin>>N>>W,N|W)){
        double res=0.01;
        int ct[11];
        memset(ct,0,sizeof(ct));
        rep(i,N){
            int v;cin>>v;
            ct[v/W]++;
        }
        int f=-1,cnt=0,mx=0;
        rep(i,11)if(ct[i]){cnt=i;if(chmax(mx,ct[i]))f=i;}
        for(int i=0;i<=cnt;i++){
            res+=(double)(cnt-i)/cnt*ct[i]/mx;
        }
        cout<<res<<endl;
    }
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    solve();
    return 0;
}
