Calculate the median value of a sequence

Input
The input will contains blocks of 2 lines.

The first line contains the number integer of following sequence.
The second line contains the sequence.
Output
The median value of the sequence (one decimal)

Sample input
5
1 5 2 4 3
4
9 7 4 6
Sample output
3.0
6.5