let () =
    let calc (x1, y1) (x2, y2) =
        sqrt (float ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)))
    in
    let main () =
        let n = int_of_string (read_line ()) in
        let xy = Array.init n (fun _ ->
            Scanf.sscanf (read_line ()) "%d %d" (fun x y -> x, y))
        in
        let rec loop_i i acc =
            let rec loop_j j acc =
                if j >= n then acc else
                    let acc = calc xy.(i) xy.(j) +. acc in
                    loop_j (j + 1) acc
            in
            if i = n then acc else
                let acc = loop_j (i + 1) acc in
                loop_i (i + 1) acc
        in
        let r = loop_i 0 0. in
        let r = r *. 2. /. float n in
        Printf.printf "%.7f\n" r
    in
    main ()