import Data.List
import Text.Printf

main = getContents >>= mapM_ (printf "%.6f\n" . grey_area) . read' . lines
 where
  read' ("0 0":_) = []
  read' (nw:xs) = ((n,w), map read vs) : read' xs'
   where
    [n,w] = map read (words nw)
    (vs,xs') = splitAt n xs

grey_area :: ((Int, Int), [Int]) -> Double
grey_area ((n,w),vs) = sum (zipWith (*) darkness amount) + 0.01
 where
  darkness = [1.0,(1.0-d)..]
   where d = 1.0 / fromIntegral (div (maximum vs) w)
  amount = map ((/ (fromIntegral maxlen)) . fromIntegral . length) vs'
   where
    maxlen = maximum (map length vs')
    vs' = unfoldr equali (0,(sort vs))
    equali (n,vs)
     | null vs = Nothing
     | otherwise = let (vs1,vs2) = span (\v -> div v w == n) vs in Just (vs1,(n+1,vs2))