Scanf.scanf "%d" (fun n ->
    let v = Array.init n (fun _ -> Scanf.scanf " %f" (fun v -> v)) in
    Array.sort (fun a b -> compare b a) v;
    let rec loop i cur =
        if i = n then cur else
            loop (i + 1) ((cur +. v.(i)) /. 2.)
    in
    loop 1 v.(0) |> Printf.printf "%.6f\n"
)