#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## 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 *i*th number from the left be *A _{i}*. 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 ≤ A_{i} ≤ 10^{9}.

Subtask 2 (27%): 1 ≤ N ≤ 500000, 0 ≤ A_{i} ≤ 1.

Subtask 3 (49%): 1 ≤ N ≤ 500000, 0 ≤ A_{i} ≤ 10^{9}.

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

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 24 | 22 | 1s | 256MB | Minimum |

2 | 27 | 20 | 1s | 256MB | Minimum |

3 | 49 | 62 | 1s | 256MB | Minimum |

4 | 0 | 2 | 1s | 256MB | Minimum |

### Judge Compile Command

g++-7 ans.cpp -o towering -Wall -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512