Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %f" (fun f -> f)) in
    let m = Array.fold_left ( *.) 1. a in
    let g = Array.fold_left (fun acc v -> acc +. m /. v) 0. a in
    Printf.printf "%.6f\n" @@ m /. g
)