#include <iostream>
#include <iomanip>
using namespace std;

int main() {

  while( true ) {

    long long int n, w;
    cin >> n >> w;
    if ( n == 0 ) break;

    long long int v[11] = {};
    long long int w_max = 0;
    long long int h_max = 0;

    for ( long long int i = 0; i < n; i++ ) {

      long long int in;
      cin >> in;

      long long int k = 0;
      while( in >= w ) {
	in -= w;
	k++;
      }
      v[k]++;
      w_max = max( w_max, k );
      h_max = max( h_max, v[k] );

    }

    double ans = 0.01;

    if ( w_max == 0 ) {

      ans += 1.00;

    }else {

      for ( long long int i = 0; i <= w_max; i++ ) {
	ans += 1.00 * ( w_max - i ) / w_max * v[i] / h_max;
      }

    }

    cout << setprecision(10) << ans << endl;

  }

  return 0;

}