import sys
n = int(sys.stdin.readline())
numbers = map(int, sys.stdin.readline().split())

numbers.sort()
scores = []
for i in xrange(n):
	for j in xrange(i-1, -1, -1):
		scores.append([numbers[j], numbers[i]])

p = 0
l = len(scores)
for i in xrange(l):
	for j in xrange(i+1):
		for m in xrange(l-1, i, -1):
			if scores[i][1] + scores[j][1] < scores[m][1]:
				p += 1
			else:
				break

print p/float(l**3)