import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); ArrayList arrayList = new ArrayList<>(); for (int i = 0; i < n; i++) { arrayList.add(sc.nextInt()); } Collections.sort(arrayList); // 중간값(median)을 출력 System.out.println(arrayList.get((n - 1) / 2)); } }