require 'complex'

N = gets.to_i
a_xy = []
sum = 0.to_f

N.times do
  xy = gets.to_s.chomp.split.map(&:to_i)
  a_xy.push(xy)
end

keiros = a_xy.permutation(N).to_a

keiros.each do |keiro|
  i = 0
  bx = 0
  by = 0
  
  keiro.each do |machi|
    x = machi[0]
    y = machi[1]
    
    if i > 0
      k = (x - bx) * (x - bx) + (y - by) * (y - by)
      kyori = Math.sqrt(k).to_f
      sum += kyori
    end
    
    bx = machi[0]
    by = machi[1]
    i += 1
  end
end

p sum / keiros.length