import java.lang.reflect.Array; import java.util.Arrays; import java.util.Scanner; class Yukicoder { static public void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); if (N < 1 || N > 1000) System.exit(1); int[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = scanner.nextInt(); if (A[i] < -1000 || A[i] > 1000) System.exit(1); } for (int i = N; i > 1; i--) { heapSort(i, A); swap(A, 0, i-1); } float mid; if (N%2 == 1) mid = A[N/2]; else mid = (((float) A[N / 2 - 1]) + A[N/2])/2; System.out.println(mid); } static public void heapSort (int leaf, int[] A) { int root = leaf/2-1; int tmp; for (int i = root; i >= 0; i--) { while ((root+1)*2 <= leaf) { if ((root+1)*2 == leaf) { tmp = (root+1)*2 - 1; } else { if (A[(root+1)*2 - 1] < A[(root+1)*2]) tmp = (root+1)*2; else tmp = (root+1)*2 - 1; } if (A[root] < A[tmp]) { swap(A, root, tmp); root = tmp; } else break; } root = i - 1; } } static private void swap (int[] A, int a, int b){ int tmp; tmp = A[a]; A[a] = A[b]; A[b] = tmp; } }