#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string s;
  cin >> s;
  istringstream iss(s);
  string buf;
  vector<string> v;
  while (getline(iss, buf, ' ')) {
    v.push_back(buf);
  }
  int i = 0;
  int len = (int)s.length();
  int P[300000];
  while (len < i) {
    P[i] = atoi(v[i].c_str());
    i++;
  }
  double sum_all = 0;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j <= N; j++) {
      sum_all += P[i] + P[j];
    }
  }
  double D = 1e9 + 7;
  double result = sum_all / D;
  return 0;
}
