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

int main(){
	cout<<fixed<<setprecision(7);
	
	while(true){
		int n, w, v, count[110] = {}, ma = 0, ma2 = 0;
		double ans = 0.01;
		
		cin>>n>>w;
		
		if(!n&&!w) break;
		
		for(int i = 1; i <= n; i++){
			cin>>v;
			
			count[v/w]++;
			
			ma = max(ma, count[v/w]);
			ma2= max(ma2, v/w);
		}
		
		for(int i = 0; i <= ma2; i++)
			ans += ((double)count[i]/ma)*(double)(ma2-i)/ma2;
		
		cout<<ans<<endl;
		
	}
}
