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

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

let lst = Str.split (Str.regexp " ") (read_line ())
          |> List.map float_of_string

let rec f lst =
        match lst with
                  [] -> 0.0
                | first :: second :: [] -> 
                        (first +. second) /. 2.0
                | first :: rest -> 
                        let v = f rest in
                                if v < first then
                                        first
                                else
                                        v

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