N = gets.chomp.to_i
points = []

def distance(a,b)
  dis = (a[0]-b[0])**2 + (a[1]-b[1])**2
  return Math.sqrt(dis)
end

N.times do
  point = gets.chomp.split(" ").map(&:to_i)
  points << point
end

distances = []

while points.length > 0 do
  i = points.shift
  points.each do |e|
    distances << distance(i,e)
  end
end

result = 0
distances.each do |e|
  result += e
end

result = 2 * result / N

puts result