#include<stdio.h> int main(){ int n; while(scanf("%d",&n)!=EOF){ if(n==0) return 0 ; int array[n+1]; for(int i=1;i<n+1;i++){ scanf("%d",&array[i]); } int i,j; for(int i=2;i<n+1;i++){ if(array[i-1]>array[i]){ array[0]=array[i]; for(j=i-1;array[j]>array[0];--j){ array[j+1]=array[j]; } array[j+1]=array[0]; } } if(n%2==0){ printf("%d\n",(array[n/2]+array[n/2+1])/2); } else{ printf("%d\n",array[n/2+1]); } } return 0; }