#include <bits/stdc++.h>

void DumpHistgram(int n, int array[]) {
  int max = 0;
  for(int i = 0; i < (int)n; ++i) {
    max = std::max(max, array[i]);
  }
  for(int i = 0; i < (int)n; ++i) {
    printf("%3d : ", i);
    for(int j = 0; j < (int)array[i]*30/max; ++j) {
      std::cout << '*';
    }
    std::cout << std::endl;
  }
}

int main() {
  int n, w;
  while( std::cin >> n >> w, not ( n == 0 and w == 0 ) ) {
    int h[200] = {};
    double level[200];
    for(int i = 0; i < (int)n; ++i) {
      int t;
      std::cin >> t;
      h[t/w] += 1;
    }
    //DumpHistgram(10, h);
    int max = h[0];
    for(int i = 0; i < (int)200; ++i) {
      max = std::max(max, h[i]);
    }
    int right = 0;
    for(int i = 0; i < (int)200; ++i) {
      if( h[i] != 0 ) right = i;
    }
    for(int i = 0; i < (int)right + 1; ++i) {
      level[i] = 1.0 - 1.0 * i / (right);
    }
    double res = 0.0;
    for(int i = 0; i < (int)right + 1; ++i) {
      res += level[i] * ((double)h[i] / max);
    }
    printf("%.20lf\n", res + 0.01);
  }
  
  return 0;
}