import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args) { // int[] a1 = {1, 5, 2, 4, 7}; // int[] a2 =new int[a1.length]; // System.arraycopy(a1, 0, a2, 0, a1.length); // BubbleSort bs = new BubbleSort(a1); // bs.getArrayAsc(); // for(int i = 0; i < a1.length; i++) { // System.out.println(a1[i] + "/" + a2[i]); // } //System.out.println("数字の数"); Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int array[] = new int[N]; for(int i = 0; i < N; i++) { array[i] = scanner.nextInt(); } scanner.close(); //BubbleSort bs = new BubbleSort(array); //int[] array1 = bs.getArrayAsc(); Arrays.sort(array); if(N % 2 ==0) { double ans = (double)(array[N/2-1]+array[N/2])/2; System.out.println(ans); }else { System.out.println(array[(N+1)/2-1]); } } }