n = gets.chomp.to_i
zahyou = readlines.map{|elem| elem.chomp.split(" ").map(&:to_f)}

def calc_distance (p,q)
  ((p[0]-q[0])**2 + (p[1]-q[1])**2)**(0.5)
end

distance = zahyou.combination(2).map{|elem| calc_distance(elem[0],elem[1])}
puts distance.inject(&:+)*2.0/n
