#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int INF = 2000000100;
constexpr int DIV = 1000000007;
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
T divUp(T a, T b) {
  if (a % b == 0) {
    return a / b;
  }
  return a / b + 1;
}
std::string strMulti(std::string t, int n) {
  std::string out = "";
  for (int i = 0; i < n; i++) {
    out += t;
  }
  return out;
}
template <class T>
T math_P(T m, T n) {
  T ret = 1;
  for (T i = m; i > m - n; i--) {
    ret *= i;
  }
  return ret;
}
template <class T>
T math_C(T m, T n) {
  T ret = mathP(m, n);
  for (T i = 2; i <= n; i++) {
    ret /= i;
  }
  return ret;
}
template <class T>
bool compare_by_b(pair<T, T> a, pair<T, T> b) {
  if (a.second != b.second) {
    return a.second < b.second;
  }
  return a.first < b.first;
}
template <class T>
T math_gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (a < b) {
    std::swap(a, b);
  }
  T tmp;
  while (b != 0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}
template <class T>
T math_lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (a > b) {
    std::swap(a, b);
  }
  if (a == 1) {
    return b;
  }
  T i = a;
  while (i % b != 0) {
    i += a;
  }
  return i;
}
int Main() {
  int N;
  cin >> N;
  vector<int> V(N);
  for (int i = 0, i_len = (N); i < i_len; i++) cin >> V.at(i);
  sort((V).begin(), (V).end());
  ll ret = V.at(0);
  for (int i = 1; i < N; i++) {
    ret += V.at(i);
    ret /= 2;
  }
  cout << ret;
  return 0;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  Main();
  return 0;
}
