#include <bits/stdc++.h>
int main() {
  int n;
  double sum = 0;
  int v[1001];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &v[i]);
  }
  if (n > 2) {
    sum = v[0] + v[1];
    for (int i = 0; i < n; i++) {
      sum += (double)(2 * (i - 2)) * v[i];
    }
    sum = sum / (2 * (n - 1));
  } else if (n == 2) {
    sum = (double)(v[0] + v[1]) / 2;
  }
  printf("%lf\n", sum);
  return 0;
}
