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