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.

Remark

If multiple judges have assigned the lowest score, that score is ignored only once. Same for the highest score.

Input

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.

Output

A single line containing the final score of the participant.

Example

Input:

4
100
0
55
56

Output:

56