// AOJ 1285: Grey Area
// 2017.10.16 bal4u@uu

#include <stdio.h>
#include <string.h>

int f[102], sz;

int main()
{
	int n, w, v, i, j, max;
	double ans;

	while (scanf("%d%d", &n, &w) && n > 0) {
		memset(f, 0, sizeof(f));
		sz = 0; while (n-- > 0) {
			scanf("%d", &v);
			i = v/w;
			f[i]++;	if (i > sz) sz = i;
		}

		for (max = 0, i = 0; i <= sz; i++)
			if (f[i] > max) max = f[i];

		ans = 0.01;
		if (sz > 0) for (j = sz, i = 0; i <= sz; i++, j--) {
			ans += ((double)f[i])/max * ((double)j)/sz;
		}
		printf("%.16lf\n", ans);
	}
	return 0;
}