n = gets.to_i
xys = []
n.times do
  xys << gets.split.map(&:to_f)
end

distances = 0.0
xy_perms = xys.permutation
xy_perms.each do |xy|
  dis = 0
  (1..n-1).each do |i|
    dis += ((xy[i][0] - xy[i-1][0]) ** 2 + (xy[i][1] - xy[i-1][1]) ** 2) ** (1.0/2)
  end
  distances += dis
end
puts distances / xy_perms.size
