### main

loop do
  n, w = gets.split.map(&:to_i)
  break if (n | w) == 0

  vs = n.times.map{gets.to_i}
  vmax = vs.max
  #p vs

  hn = vmax / w
  hist = (hn + 1).times.map{0}
  vs.each {|v| hist[v / w] += 1}
  hmax = hist.max
  #p hmax

  ink = 0.01
  
  for i in (0..hn)
    ink += 1.0 * (hn - i) / hn * hist[i] / hmax
  end

  puts ink
end