#include <bits/stdc++.h>
int main() {
  int N;
  float total = 0, v, newv;
  std::vector<float> vtotal;
  std::cin >> N;
  for (int i; i < N; i++) {
    std::cin >> v;
    vtotal.push_back(v);
  }
  std::sort(vtotal.begin(), vtotal.end());
  for (int i; i < N - 1; i++) {
    newv = (vtotal[1] + vtotal[2]) / 2;
    total += newv;
    vtotal.erase(vtotal.begin(), vtotal.begin() + 2);
    vtotal.push_back(newv);
    std::sort(vtotal.begin(), vtotal.end());
  }
  std::cout << total << std::endl;
  return 0;
}
