#include <bits/stdc++.h>
using namespace std;
int bubbleSort(int A[], int N) {
  int sw = 0;
  bool flag = 1;
  for (int i = 0; flag; i++) {
    flag = 0;
    for (int j = N - 1; j > i; j--) {
      if (A[j] < A[j - 1]) {
        swap(A[j], A[j - 1]);
        flag = 1;
      }
    }
  }
  sw = A[0];
  return sw;
}
void diff(int A[], int minval, int N) {
  for (int i = 0; i < N; i++) {
    A[i] -= minval;
  }
}
long double nabe(int A[], int N) {
  double mean, j, sum;
  for (int i = 0; i < N - 2; i++) {
    j = double(i + 1);
    sum += A[N - 1 - i] * pow(2.0, (-j));
  }
  mean = double(A[0] + A[1]) / 2.0;
  sum += mean;
  return sum;
}
int main() {
  int sw, A[100], N;
  long double sum;
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  if (N == 2) {
    cout << double(A[0] + A[1]) / 2.0 << endl;
  } else {
    sw = bubbleSort(A, N);
    diff(A, sw, N);
    sum = nabe(A, N);
    sum += sw;
    cout << sum << endl;
  }
  return 0;
}
