#C4732. Unique Number Finder

    ID: 48303 Type: Default 1000ms 256MiB

Unique Number Finder

Unique Number Finder

You are given a sequence of n integers in which every number appears exactly twice except for one unique number. Your task is to find and print this unique number.

The solution takes advantage of the properties of the bitwise XOR operator. Recall that for any integer a, the following holds: \( a \oplus a = 0 \) and the XOR operator is both commutative and associative. Therefore, if you XOR all numbers in the sequence, the numbers that appear twice will cancel each other out and only the unique number will remain.

Note: The input is provided via standard input (stdin) and the output should be printed to standard output (stdout).

inputFormat

The first line contains an integer n, the number of elements in the sequence.

The second line contains n space-separated integers. It is guaranteed that all numbers except one appear exactly twice.

outputFormat

Print a single integer — the unique number that appears only once in the sequence.

## sample
5
2 3 4 3 2
4