#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);

signed main() {
	cout << fixed << setprecision(10);
	for (int n, w; cin >> n >> w&&n;) {
		vector<double> cnt(11, 0);
		vector<int> v(n); rep(i, 0, n) {
			cin >> v[i];
			cnt[v[i] / w]++;
		}
		int W = *max_element(begin(v), end(v)) / w;
		double max_cnt = *max_element(begin(cnt), end(cnt));
		double ans = 0.01;
		rep(i, 0, W)
			ans += (cnt[i] / max_cnt)*((double)(W - i) / W);
		cout << ans << endl;
	}
	return 0;
}