#ABC145C_AverageLength.rb
n = gets.to_i
xy = []
(1..n).each do |nn|
  xy << gets.split.map(&:to_i)
end

ar = xy.permutation(n).to_a
ar_size = ar.size

sum = 0
ar.each do |a|
  i = 0
  while i < n-1
    x = a[i][0].to_f - a[i+1][0].to_f
    y = a[i][1].to_f - a[i+1][1].to_f
    d = Math.sqrt(x**2 + y**2)
    i += 1
    sum += d
  end
end
puts sum / ar_size

