#include<iostream>
#include<algorithm>
using namespace std;
int main() {int n;cin>>n;int s[n];for(int i=0; i<n; ++i)cin>>s[i];sort(s,s+n);int ans=s[0];for(int i=1; i<n;++i)ans=(ans+s[i])/2;cout<<ans;return 0;
}
#include<iostream>
#include<algorithm>
using namespace std;
int main() {int n;cin>>n;int s[n];for(int i=0; i<n; ++i)cin>>s[i];sort(s,s+n);int ans=s[0];for(int i=1; i<n;++i)ans=(ans+s[i])/2;cout<<ans;return 0;
}