#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;

int main()
{
  while(1){
    int n, w;
    cin >> n >> w;
    if(n == 0 && w == 0) break;
    vector<double> v(11);
    fill(v.begin(), v.end(), 0.0);
    double m = 0.0;
    int mi;
    for(int i = 0; i < n; i++){
      double x;
      cin >> x;
      if(m < x){
        m = x;
        mi = x/w;
      }
      v[x/w]++;
    }
    double me = *max_element(v.begin(), v.end());
    for(int i = 0; i <= mi; i++)
      v[i] *= mi - i;
    double ans = 0;
    for(int i = 0; i <= mi; i++)
      ans += v[i];
    ans = ans / (double)mi / me + 0.01;
    printf("%.6lf\n", ans);
  }
}