LogiQuest

314. The Single Number

EasyXOR

Every value appears twice except one, which appears once. Print it, using O(1) extra memory.

Input format

Line 1: n Line 2: n integers

Output format

The single value.

Example 1

Input

3
2 2 1

Output

1

Example 2

Input

5
4 1 2 1 2

Output

4

Constraints

1 ≤ n ≤ 10⁵ (n odd)

Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.

Loading the MyLoginn IDE…