#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", p);
printf("p = %d\n", n);
seq[i] = p;
printf("seq[i] = %d\n", seq[i]);
}
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+IHgpIGotLTsKCiAgICAgICAgaWYoaTw9aikKICAgICAgICB7CiAgICAgICAgICAgIHN0ZDo6c3dhcChhcnJbaV0sYXJyW2pdKTsKICAgICAgICAgICAgaSsrOwogICAgICAgICAgICBqLS07CiAgICAgICAgfQogICAgfQogICAgaWYobDw9ayAmJiBrPD1qKQogICAgICAgIHJldHVybiBrdGgoYXJyLCBsLGosayk7CiAgICBpZiggaTw9ayAmJiBrPD1yKQogICAgICAgIHJldHVybiB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