import Data.Ratio import Text.Printf import Data.Maybe import qualified Data.ByteString.Char8 as B apply n f x = foldr ($) x (replicate n f) lmin = 0 lmax = 10e9 nbs = 100 main = do getLine ls <- map (fromIntegral . fst . fromJust . B.readInt) . B.words <$> B.getLine k <- readLn printf "%.12f" (yokuaru k ls) yokuaru :: Integer -> [Ratio Integer] -> Double yokuaru k ls = fromRational (fst (apply nbs (bsearch k ls) (1,(lmin,lmax)))) bsearch k ls (x,(xn,xx)) | cuts x ls < k = (x - (x-xn) / 2, (xn,x)) | otherwise = (x + (xx-x) / 2, (x,xx)) cuts x = sum . map (floor . (/x))