In a competition of springboard diving, a score is acknowledged by various judges. The final score of the participant is calculated by ignoring the highest and the lowest score and taking the mean of the other scores. This mean is eventually rounded off to the closest integer.
If multiple judges have assigned the lowest score, that score is ignored only once. Same for the highest score.
The first line contains a number $$n \in \mathbb{N}$$ ($$n \geq 3$$) that indicates the number of judges. This is followed by $$n$$ lines that each contain the score $$s \in \mathbb{N}$$ assigned by one of the judges.
A single line containing the final score of the participant.
Input:
4
100
0
55
56
Output:
56