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