def calc(n, w, v)
  a, r = 0.01, [0] * 100
  v.each do |e|
    r[e / w] += 1
  end
  (v.max / w).times do |i|
    a += r[i].to_f / r.max * (v.max / w - i) / (v.max / w)
  end
  a
end
loop do
  n, w = gets.split.map(&:to_i)
  break if n == 0
  v = []
  n.times do |i|
    v[i] = gets.to_i
  end
  puts calc(n, w, v)
end