(*
ocamlfind ocamlopt -package batteries -linkpkg main.ml -o a.out
*)
open Batteries

let n = Scanf.sscanf (read_line ()) "%d" (
        fun n -> 
                n
)

let sorted = Str.split (Str.regexp " ") (read_line ())
             |> List.map float_of_string
             |> List.fast_sort compare

let rec f lst =
        match lst with
                  [] -> 0.0
                | first :: [] -> 
                        first
                | first :: second :: rest -> 
                        let v = (first +. second) /. 2.0 in
                        let rlst = List.fast_sort compare ([v] @ rest) in
                                f rlst


let () = 
        f sorted
        |> Printf.printf "%f\n"
