Bob's data management teacher has given him an assignment involving an array of numbers. Specifically, he has to find the median of the array, which is defined as the middle element of the array after it has been sorted.
Unfortunately, Bob is too lazy to do the assignment. Please help Bob finish it by finding the median for him.
The first line of input will contain an integer, . It is guaranteed that is odd.
The next line of input will contain space-separated integers, .
Output one integer, the median of the array.
1 9 6 3 5 2 10
Explanation for Sample Output
The sorted array is , therefore the median is .