#include<iostream>
#include<algorithm>
using namespace std;
const int Maxn=100100;
int n;
int a[Maxn];
int s[Maxn];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	int ss=-1,sum=0;
	for(int i=1;i<=(n+1)/2;i++){
		ss+=2;
		s[i]=ss;
		sum+=a[i];
	}
	for(int i=(n+1)/2+1;i<=n;i++){
		s[i]=s[n-i+1]+1;
		sum+=a[i];
	}
/*	for(int i=1;i<=n;i++){
		cout<<s[i]<<endl;
	}*/
	sort(a+1,a+1+n);
/*	for(int i=1;i<=n;i++){
		cout<<a[i]<<endl;
	}*/
	ss=0;
	for(int i=1;i<=n;i++){
		ss+=a[i];
		if(ss>=sum/2+1){
			cout<<a[i]<<endl;
			return 0;
		}
	} 
	return 0;
}