#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

int hist[100];

int main() {
  int n, w;
  while (scanf("%d %d", &n, &w), n|w) {
    MEMSET(hist, 0);
    double ans = 0.01;
    double height = 0;
    int right = 0;
    REP(i, n) {
      int v;
      scanf("%d", &v);
      v /= w;
      hist[v]++;
      right = max(right, v);
      height = max(height, (double)hist[v]);
    }
    REP(i, right + 1) {
      ans += (double)hist[i] / (double)height * (double)(right - i) / (double)right;
    }
    printf("%.5lf\n", ans);
  }
}