Construction of the School
In the village of Internetivka, all the houses are lined up along one side of a street. On the opposite side, there is currently nothing, but soon there will be amenities like schools, shops, and cinemas.
The first step is to build a school. The location for the school should be chosen such that the total distance traveled by students from their homes to the school is minimized.
The village layout can be visualized as a line, with houses positioned at specific integer points along this line. The school must also be built at an integer point on this line (it can even be at the same point as a house, as the school will be on the opposite side of the street).
Write a program that, given the coordinates of the students' houses, determines the optimal coordinate for building the school.
Input
First, you will receive the number N—the number of students (1 ≤ N ≤ 100000). Following this, the coordinates of the students' houses are provided in strictly increasing order—these are integers not exceeding 2∙10^9 in absolute value.
Output
Output a single integer—the coordinate of the optimal point to build the school. If there are multiple valid answers, you may output any one of them.