Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

B. Optimal Point on a Line

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given *n* points on a line with their coordinates *x*_{i}. Find the point *x* so the sum of distances to the given points is minimal.

Input

The first line contains integer *n* (1 ≤ *n* ≤ 3·10^{5}) — the number of points on the line.

The second line contains *n* integers *x*_{i} ( - 10^{9} ≤ *x*_{i} ≤ 10^{9}) — the coordinates of the given *n* points.

Output

Print the only integer *x* — the position of the optimal point on the line. If there are several optimal points print the position of the leftmost one. It is guaranteed that the answer is always the integer.

Example

Input

4

1 2 3 4

Output

2

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/24/2017 05:11:36 (p1).

Desktop version, switch to mobile version.
User lists

Name |
---|