import Control.Monad
import Data.List
import qualified Data.Vector.Unboxed as VU
import Debug.Trace

solve :: VU.Vector Int -> Int -> Double
solve ps k =
    let
        pairs = get ps k (VU.singleton 0)
        l = VU.foldl' lcm 1 pairs
        sum' = VU.sum $ VU.map (\d -> (sum [1..d]) * (l `quot` d)) $ pairs
    in
        (realToFrac (sum'::Int)) / (realToFrac (l ::Int))
    
    where
        get ps k qs
            | VU.length ps < k = qs
            | otherwise =
                let
                    ts = VU.take k ps
                in
                    if VU.sum ts > VU.sum qs
                        then get (VU.tail ps) k ts
                        else get (VU.tail ps) k qs
            


main = do
    [n,k] <- map read . words <$> getLine :: IO [Int]
    ps <- VU.fromList . map read . words <$> getLine :: IO (VU.Vector Int)
    print $ solve ps k