Uncovering the Lone Heart

Uncovering the Lone Heart

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Time Limit: 1.0 s

Memory Limit: 256.0 MB

Description

In your group of N friends, everyone is happily paired up with their significant other. Each friend has found their perfect match, and these pairs are represented in an array A of size N. In this array, each paired friend is assigned the same value, reflecting their partnership. For example, if friend 1 is paired with friend 2, they might both have the value 5 in the array.

However, there’s one friend who doesn’t have a partner—a unique individual who shows up alone. This friend is represented by a unique value in the array, different from all the others who are part of a pair.

Your mission is to find this lone friend by identifying the unique value in the array A. With all your friends’ values mixing together, can you pinpoint the one value that doesn’t have a match? Use your skills to uncover the truth and find the friend who’s still flying solo in the group!

NOTE: It is guaranteed that N will be an odd number

Input

The first line contains an integer value N(1 ≤ N < \(10^5\))
The second line contais N integers \(A_1\) , \(A_2\) ,,, \(A_N\) (1 ≤ \(A\)\(10 ^ {9}\))

Output

Print the lonely soul person.

Sample

Input Output
5
1 1 2 3 3
2

Brain Booster #6

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
9
Start at
2024-10-03 15:30
End at
2024-10-03 18:00
Duration
2.5 hour(s)
Host
Partic.
151