

import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int result = 0;
int n = Integer.parseInt(br.readLine());
int none = (int) Math.round(n * 0.15);
ArrayList<Integer> list = new ArrayList<>();
for(int i=0; i<n; i++) {
list.add(Integer.parseInt(br.readLine()));
}
Collections.sort(list);
int size = n - (none * 2);
for(int i=none; i<size+none; i++) {
result += list.get(i);
}
result = (int) Math.round((double)result/size);
System.out.println(result);
}
}