#include<bits/stdc+++.h>
using namespace std;

#define int long long

signed main(){
  int n;
  cin >> n;
  
  int a[n+1];
  for(int i = 1;i<=n;i++)cin >> a[i];
  
  sort(a+1,a+n+1);
  int ans = a[1];
  
  for(int i = 2;i<=n;i++){
    ans = (ans+a[i])/2;
  }
  cout << ans << endl;
  
  return 0;
}