require 'complex'

N = gets.chomp.to_i
Towns = N.times.map { |n| 
  x, y = gets.chomp.split(' ').map(&:to_i)
  [x, y]
}

average = 0;
count = 0;
(0...N).to_a.permutation(N) do |t|
  distance = (1...N).map do |n|
    ima = Towns[t[n-1]]
    tsugi = Towns[t[n]]
    dx = tsugi[0] - ima[0]
    dy = tsugi[1] - ima[1]
    Math.sqrt(dx*dx + dy*dy)
  end
  count += 1
  average += distance.reduce(&:+)
end

puts average / count
