def dist(a,b,data)
  ((data[a][0]-data[b][0])**2+(data[a][1]-data[b][1])**2)**0.5
end
s=0.0
data=[];(n=gets.to_i).times{data<<gets.split.map(&:to_i)}
path=[*0..(n-1)].permutation(n).to_a
path.each{|a|
a.each_cons(2){|a,b|s+=dist(a,b,data)}
}
p s/path.size