Skip to content
UPEEC

The Lonely Number

Easy#bit-manipulation#xor· solved by 0 · time limit 2.0 s

Every value appears exactly twice except one, which appears once. Find it using O(1)O(1) extra memory (hint: XOR).

Input

nn (odd), then nn integers.

Output

The single value.

Constraints

1≤n≤1051 \le n \le 10^5

Sample 1

Input

5
4 1 2 1 2

Output

4

Sample 2

Input

1
7

Output

7

Sign in or join free to run and submit your solution.