Dr. Grey is a data analyst, who visualizes various aspects of data received from all over the world everyday. He is extremely good at sophisticated visualization tools, but yet his favorite is a simple self-made histogram generator.

Figure 1 is an example of histogram automatically produced by his histogram.

<image>

A histogram is a visual display of frequencies of value occurrences as bars. In this example, values in the interval 0-9 occur five times, those in the interval 10-19 occur three times, and 20-29 and 30-39 once each.

Dr. Grey’s histogram generator is a simple tool. First, the height of the histogram is fixed, that is, the height of the highest bar is always the same and those of the others are automatically adjusted proportionately. Second, the widths of bars are also fixed. It can only produce a histogram of uniform intervals, that is, each interval of a histogram should have the same width (10 in the above example). Finally, the bar for each interval is painted in a grey color, where the colors of the leftmost and the rightmost intervals are black and white, respectively, and the darkness of bars monotonically decreases at the same rate from left to right. For instance, in Figure 1, the darkness levels of the four bars are 1, 2/3, 1/3, and 0, respectively.

In this problem, you are requested to estimate ink consumption when printing a histogram on paper. The amount of ink necessary to draw a bar is proportional to both its area and darkness.



Input

The input consists of multiple datasets, each of which contains integers and specifies a value table and intervals for the histogram generator, in the following format.

n w
v1
v2
.
.
vn


n is the total number of value occurrences for the histogram, and each of the n lines following the first line contains a single value. Note that the same value may possibly occur multiple times.

w is the interval width. A value v is in the first (i.e. leftmost) interval if 0 ≤ v < w, the second one if w ≤ v < 2w, and so on. Note that the interval from 0 (inclusive) to w (exclusive) should be regarded as the leftmost even if no values occur in this interval. The last (i.e. rightmost) interval is the one that includes the largest value in the dataset.

You may assume the following.

1 ≤ n ≤ 100
10 ≤ w ≤ 50
0 ≤ vi ≤ 100 for 1 ≤ i ≤ n


You can also assume that the maximum value is no less than w. This means that the histogram has more than one interval. The end of the input is indicated by a line containing two zeros.

Output

For each dataset, output a line containing the amount of ink consumed in printing the histogram.

One unit of ink is necessary to paint one highest bar black. Assume that 0.01 units of ink per histogram is consumed for various purposes except for painting bars such as drawing lines and characters (see Figure 1). For instance, the amount of ink consumed in printing the histogram in Figure 1 is:

<image>

Each output value should be in a decimal fraction and may have an error less than 10-5 .

Example

Input

3 50
100
0
100
3 50
100
100
50
10 10
1
2
3
4
5
16
17
18
29
30
0 0


Output

0.51
0.26
1.4766666666666667

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
while 1:
	(n, w) = map(int, input().split())
	if n == 0:
		break
	dic = {}
	mx = -1
	max_section = -1
	for i in range(1 + 100 // w):
		dic[i] = 0
	for i in range(n):
		x = int(input())
		dic[x // w] += 1
		mx = max(mx, dic[x // w])
		max_section = max(max_section, x // w)
	ans = 0
	for i in range(1 + 100 // w):
		ans += dic[i] / mx * (1 - i * (1 / max_section))
	print(ans + 0.01)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 998244353

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	rr = []
	while True:
		(n, w) = LI()
		if n == 0:
			break
		a = [I() for _ in range(n)]
		ma = max(a)
		l = ma // w + 1
		b = [0] * l
		for c in a:
			b[c // w] += 1
		h = max(b)
		r = 0.01
		for i in range(l):
			bi = b[i]
			d = (l - i - 1) / (l - 1)
			r += d * bi / h
		rr.append(r)
	return '\n'.join(map(str, rr))
print(main())


while True:
	(n, w) = list(map(int, input().split()))
	if n == 0:
		break
	v = [int(input()) for i in range(n)]
	h = [0 for i in range(100)]
	ma = 0
	mi = 1000000000.0
	for i in range(n):
		h[v[i] // w] += 1
		ma = max(ma, v[i] // w)
		mi = min(mi, v[i] // w)
	sm = ma - mi
	h = [h[i] / max(h) for i in range(100)]
	ans = 0.01
	for i in range(mi, ma):
		ans += (sm - i + mi) / (sm + mi) * h[i]
	print(ans)


while True:
	(N, W) = map(int, input().split())
	if N == 0:
		break
	src = [int(input()) for i in range(N)]
	highest = max(src)
	bands = highest // W + 1
	hist = [0 for i in range(bands)]
	for i in range(N):
		hist[src[i] // W] += 1
	ans = maxn = 0
	for (i, n) in enumerate(hist):
		ans += n * (bands - 1 - i)
		maxn = max(n, maxn)
	print(ans / maxn / (bands - 1) + 0.01)


while True:
	(n, w) = map(int, input().split())
	if n is 0 and w is 0:
		break
	l = [int(input()) for i in range(n)]
	max_num = 0
	for i in range(n):
		max_num = max(max_num, l[i])
	hist_size = int(max_num / w + 1)
	hist = [0.0] * int(hist_size)
	for i in range(n):
		hist[int(l[i] / w)] += 1
	max_height = 0
	for i in range(hist_size):
		max_height = max(max_height, hist[i])
	ans = 0.0
	for i in range(hist_size - 1):
		ans += hist[i] / max_height * (hist_size - 1 - i) / (hist_size - 1)
	ans += 0.01
	print(ans)


while 1:
	(n, w) = map(int, input().split())
	if n == w == 0:
		break
	a = [0] * 100
	s = h = int(0)
	while n:
		b = int(input())
		a[b // w] += 1
		s = max(s, b // w)
		h = max(h, a[b // w])
		n -= 1
	ans = 0.01
	for i in range(int(s) + 1):
		ans += a[i] / h * (s - i) / s
	print(ans)


while True:
	(N, W) = map(int, input().split())
	if not N:
		break
	s = list(sorted([int(input()) for i in range(N)]))
	m = s[-1] // W + 1
	ss = [0] * m
	for c in s:
		ss[c // W] += 1
	unit = max(ss)
	a = 0
	for (i, c) in enumerate(ss):
		a += (1 - i / (m - 1)) * (c / unit)
	print(a + 0.01)