n = gets.to_i
xys = []

n.times do
  xys << gets.split("\s").map(&:to_i)
end
sum = 0
count = 0

(0..n-1).to_a.permutation do |prm|
  post = nil
  prm.each do |i|
    unless post
      post = xys[i]
      next
    end
    sum += Math.sqrt((post[0] - xys[i][0])**2 + (post[1] - xys[i][1])**2)
    post = xys[i]
  end
  count += 1
end
p sum / count.to_f