A = Array.new(N=gets.to_i) { gets.split.map &:to_i }
c = t = 0
A.permutation(N) { |a|
	d = []
	a.each_cons(2) { |a,b| 
		d << a.zip(b).map {|a,b| (a-b)**2}.sum
	}
	t += d.sort!.inject(0) {|s,i| s + i**0.5}
	c += 1
}
p t/c