#include <bits/stdc++.h>
using namespace std;
const long long MAX = 15001;
long long n, arr[MAX], ans;
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> arr[i];
  sort(arr, arr + n);
  for (long long i = 0; i < n - 1; ++i)
    for (long long j = 0; j < n - 1; ++j)
      for (long long k = 0; k < n - 1; ++k)
        if (arr[i + 1] + arr[j + 1] + arr[k] < arr[i] + arr[j] + arr[k + 1])
          ans += (k + 1) * (i + 1) * (j + 1);
  cout << fixed << setprecision(7)
       << long double(ans) / long double(n) / long double(n) / long double(n);
  return 0;
}
