import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = scan.nextInt(); } Arrays.sort(a); int j = n / 2; if (n % 2 != 0) { System.out.println(a[j]); } else { System.out.println((double)(a[j - 1] + a[j]) / 2); } scan.close(); } }