code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
map<int,int> mp;
register int t;
while(scanf("%d",&t) != EOF) {
if(mp.find(t)==mp.end()) { mp[t]=1 ; continue; }
if(++mp[t]>=(n/2)) { printf("%d\n",t); return 0; }
}
}