402382: GYM100741 D Xor Sum

Memory Limit:4 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Xor Sumtime limit per test1 secondmemory limit per test4 megabytesinputstandard inputoutputstandard output

You're given an array a with n elements.

Compute the xor sum of the elements that appear an odd number of times in the array a.

Input

The first line contains number n (1 ≤ n ≤ 3000000). The second line of the input contains n numbers, representing the array a. All elements of a are between 0 and 109

Output

The only line of the output contains the answer of the problem.

ExamplesInput
5
4 4 3 3 4
Output
4

加入题单

上一题 下一题 算法标签: