#include <stdio.h>
#include <stdlib.h>

#define N 100
#define MAX(A,B) \
  ( (B) > (A) ? (B) : (A) )

int
main (
  int   argc,
  char *argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    double res = 0.01;
    int h[ N ] = { 0 };
    int hmx = 0;
    int d[ N ];
    int dmx = 0;
    int n, w;

    scanf ( "%d%d", &n, &w );
    if ( n == 0 && w == 0 )
      break ;
    for ( i = 0; i < n; ++i )
      scanf ( "%d", &d[ i ] );
    for ( i = 0; i < n; ++i )
      dmx = MAX( dmx, d[ i ] );
    for ( i = 0; i < n; ++i )
      ++h[ d[ i ] / w ];
    for ( i = 0; i < n; ++i )
      hmx = MAX( hmx, h[ i ] );
    for ( i = 0; i <= dmx / w; ++i )
      res += h[ i ] * ( dmx / w - i ) / (double)( dmx / w ) / (double)hmx;

    printf ( "%.6f\n", res );
  }

  return ( EXIT_SUCCESS );
}