//1029
//思路:奇数个数的话,出现次数超过(N+1)/2的话,排序以后就是在中位数的位置的数就是要找的数,这个想法超级聪明(参考:http://blog.csdn.net/qq_21057881/article/details/50088389)
/*#include<iostream>
#include<algorithm>
#define N 1000
using namespace std;
int num[N];
int main()
{
int n;
int i;
while (cin>>n)
{
for ( i = 0; i < n; i++)
{
cin >> num[i];
}
sort(num, num + n);
cout << num[(n+1) / 2] << endl;
}
return 0;
}*/