#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define pi 3.14159265359
#define shosu(X) fixed << setprecision(X)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
  int n,w,v;
  while(cin >> n >> w, n){
    int N = 0;
    double p[11] = {0};
    REP(i,n){
      cin >> v; p[v/w]++;
      N = max(N,v/w);
    }
    double d = *max_element(p,p+11),ans = 0;
    REP(i,N){
      ans += (p[i]/d)*((double)(N-i)/N);
    }
    cout << shosu(10) << ans+0.01 << endl;
  }
  return 0;
}