import Data.Array import Data.List(sort) pickMedian xs = (xs ! mid + xs ! mid2) / 2 where mid = (length xs - 1) `div` 2 mid2 = if mod mid 2 == 1 then mid else (length xs) `div` 2 median xs = pickMedian $ listArray (0, length xs - 1) (sort xs) readInt :: String -> Double readInt = read main = getLine >>= print . median . map readInt . words