import Data.Bits
import Data.List
import Control.Monad
import Data.Graph
import qualified Data.Vector.Unboxed as V
--import qualified Data.Vector.Unboxed.Mutable as VM
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Lazy.Char8 as B
--import Debug.Trace
g :: V.Vector Double -> Int -> Int -> V.Vector Double
g vs i j = V.fromList $ (((vs V.! i) + (vs V.! j)) / 2) : [ vs V.! i' | i' <- [0..(V.length vs) -1], i' /= i, i' /= j ]


f :: V.Vector Double -> Double
f vs = if V.length vs == 2 then ( V.sum vs) / 2 else maximum [f $ g vs i j| i <- [0..(V.length vs) -1], j <- [0..(V.length vs) -1], i < j]

main :: IO ()
main = do
  n <- readLn :: IO Double
  vs <- map read.words <$> getLine :: IO [Double]
  print $ f $ V.fromList vs
