#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9;
const int MOD = 1e9 + 7;

int main()
{
  int n, w;
  while (cin >> n >> w, n || w)
  {
    int mp[101] = {};
    int num = 0;
    for (int i = 0; i < n; ++i)
    {
      int v;
      cin >> v;
      mp[v / w]++;
      num = max(num, v / w);
    }

    int nmax = 0;
    double sum = 0.01;
    for (int i = 0; i <= num; ++i)
    {
      nmax = max(nmax, mp[i]);
    }

    for (int i = 0; i <= num; ++i)
    {
      sum += (double)((1.0 * (num - i) / num) * (1.0 * mp[i] / nmax));
    }
    cout << setprecision(10) << sum << endl;
  }

  return 0;
}

