let scan_int () = Scanf.scanf " %d" (fun x -> x)
let scan_floats () = Scanf.scanf " %f %f" (fun x y -> (x, y))
let print_float n = Printf.printf "%.12f\n" n
let scan_array len read_func = Array.init len (fun _ -> read_func())

let rec sum_of_dist xy i j n ret =
  if i >= n then ret
  else if j >= n then sum_of_dist xy (i+1) (i+2) n ret
  else
    let x1, y1 = xy.(i) in
    let x2, y2 = xy.(j) in
    let dist = sqrt ((x2-.x1)*.(x2-.x1) +. (y2-.y1)*.(y2-.y1)) in
    sum_of_dist xy i (j+1) n (ret+.dist)

let () =
  let n = scan_int() in
  let xy = scan_array n scan_floats in
  let sum = sum_of_dist xy 0 1 n 0.0 in
  print_float (sum *. 2.0 /. (float n))