Welcome to your third game.
Looking around the room, there are players left, including yourself - player .
The objective in this game to find your matching partner.
Each person's cyan jersey is numbered with . There doesn't seem to be any duplicate numbers.
The sum of the numbers on you and your partner's jerseys should be the same for each pair.
And if you don't find your partner soon, you'll be eliminated.
Input Specifications
On the first line, an integer .
On the second line, space-separated integers, .
Output Specifications
On a single line, print the jersey number of your partner.
It is guaranteed that there exists a unique solution.
Constraints
Subtask 1 [50%]
Subtask 2 [50%]
Sample Input 1
3
1 4 8 7 11 5
Sample Output 1
11
Sample Explanation 1
The pairs should be 1 11
, 4 8
, 5 7
, where each pair adds to .
Comments