Problem Description
Gug is bored, so he took out a bunch of his childhood toys and started building a tower. The tower has comprises of N blocks at its base, N - 1 block on the next level, and so on, until one final block at the top of the tower. Here is an illustration of the tower:
Gug, being Gug, writes a number onto each of the blocks on the tower's base. Let the ith number from the left be Ai. He then goes up the tower, layer by layer, and labels each block with the XOR of the two numbers below it.
Gug wants to know what the top number will be.
Limits
Subtask 1 (24%): 1 ≤ N ≤ 2000, 0 ≤ Ai ≤ 109.
Subtask 2 (27%): 1 ≤ N ≤ 500000, 0 ≤ Ai ≤ 1.
Subtask 3 (49%): 1 ≤ N ≤ 500000, 0 ≤ Ai ≤ 109.
Subtask 4 (0%): Sample Testcases.
Input
The first line of input will contain one integer, N.
The second line of input will contain N integers, representing the array A.
Output
The output should contain one integer, the number at the top of Gug's tower.
Sample Testcase 1
Input
3
5 2 3
Output
6
Sample Testcase 2
Input
6
7 2 6 11 3 0
Output
6