#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
int N;
cin>>N;
int len[N];
for(int i = 0;i<N;i++)
{
cin>>len[i];
}
sort(len,len+N);
double t = (len[0]+len[1])/2.0;
for(int i = 2;i<N;i++)
{
t = (t+len[i])/2.0;
}
cout<<(int)t;
return 0;
}