Given an array A of n integers. Define function f(l,r) as: Al OR Al+1 ... OR Ar. Calculate XOR of all f(l,r) with 1≤l≤r≤n.
### Input
- The first line contains an integer n.
- The second line contains n integers Ai.
### Output
- Print the result.
### Constraints
- 1≤n≤106.
- 0≤Ai≤109.
### Example
Input:
3143
Output:
3