#include <iostream>
#include <stdio.h>
#include <stdlib.h>
long long kth(int *arr, int l,int r,int k)
{
long long x = arr[(l+r) / 2];
int i=l,j=r;
while(i<=j)
{
while(arr[i] < x) i++;
while(arr[j] > x) j--;
if(i<=j)
{
std::swap(arr[i],arr[j]);
i++;
j--;
}
}
if(l<=k && k<=j)
return kth(arr, l,j,k);
if( i<=k && k<=r)
return kth(arr, i,r,k);
return arr[k];
}
int main(){
int i, n, p, q;
int *seq;
scanf("%d", &n);
printf("n = %d\n", n);
seq = (int *)malloc(n*sizeof(int));
for(i = 0; i < n; i++){
scanf("%d", *(seq + i));
printf("p = %d\n", n);
}
if(n & 0x1){
p = kth(seq, 0, n, (n + 1) / 2);
printf("%d\n", p);
}else{
double a, b;
a = kth(seq, 0, n, n/2);
b = kth(seq, 0, n, (n/2) + 1);
printf("%.1f\n", (a + b) / 2);
}
scanf("%d", &n);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKbG9uZyBsb25nIGt0aChpbnQgKmFyciwgaW50IGwsaW50IHIsaW50IGspCnsKICAgIGxvbmcgbG9uZyB4ID0gYXJyWyhsK3IpIC8gMl07CiAgICBpbnQgaT1sLGo9cjsKICAgIHdoaWxlKGk8PWopCiAgICB7CiAgICAgICAgd2hpbGUoYXJyW2ldIDwgeCkgaSsrOwogICAgICAgIHdoaWxlKGFycltqXSA+IHgpIGotLTsKCiAgICAgICAgaWYoaTw9aikKICAgICAgICB7CiAgICAgICAgICAgIHN0ZDo6c3dhcChhcnJbaV0sYXJyW2pdKTsKICAgICAgICAgICAgaSsrOwogICAgICAgICAgICBqLS07CiAgICAgICAgfQogICAgfQogICAgaWYobDw9ayAmJiBrPD1qKQogICAgICAgIHJldHVybiBrdGgoYXJyLCBsLGosayk7CiAgICBpZiggaTw9ayAmJiBrPD1yKQogICAgICAgIHJldHVybiBrdGgoYXJyLCBpLHIsayk7CiAgIC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