#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int iv = 0; iv < n; iv++) {
    cin >> v[iv];
  }
  sort(v.begin(), v.end());
  int ans = 0;
  for (int ians = 0; ians < n; ians++) {
    ans = ans + v[ians] * pow(0.5, ians);
  }
  cout << ans << endl;
}
