#include <bits/stdc++.h>
using namespace std;
const long long MAX = 15001;
long long n, arr[MAX], ans, a, b, c;
bool flag;
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[0] < arr[i] + arr[j] + arr[k + 1]) {
          flag = true;
          for (int l = 0; l <= k; ++l)
            if (arr[i + 1] + arr[j + 1] + arr[l] >=
                arr[i] + arr[j] + arr[k + 1]) {
              a = l;
              flag = false;
              break;
            }
          if (flag) a = k + 1;
          flag = true;
          for (int l = i; l >= 0; --l)
            if (arr[i + 1] + arr[j + 1] + arr[0] >=
                arr[l] + arr[j] + arr[k + 1]) {
              b = i - l;
              flag = false;
              break;
            }
          if (flag) b = i + 1;
          flag = true;
          for (int l = j; l >= 0; --l)
            if (arr[i + 1] + arr[j + 1] + arr[0] >=
                arr[i] + arr[l] + arr[k + 1]) {
              c = j - l;
              flag = false;
              break;
            }
          if (flag) c = j + 1;
          ans += a * b * c;
        }
      }
  cout << fixed << setprecision(7)
       << long double(ans) / long double(n) / long double(n) / long double(n);
  return 0;
}
