Catherine received an array of integers as a gift for March 8. Eventually she grew bored with it, and she started calculated various useless characteristics for it. She succeeded to do it for each one she came up with. But when she came up with another one — xor of all pairwise sums of elements in the array, she realized that she couldn't compute it for a very large array, thus she asked for your help. Can you do it? Formally, you need to compute

$$ (a_1 + a_2) \oplus (a_1 + a_3) \oplus \ldots \oplus (a_1 + a_n) \\ \oplus (a_2 + a_3) \oplus \ldots \oplus (a_2 + a_n) \\ \ldots \\ \oplus (a_{n-1} + a_n) \\ $$

Here $x \oplus y$ is a bitwise XOR operation (i.e. $x$ ^ $y$ in many modern programming languages). You can read about it in Wikipedia: https://en.wikipedia.org/wiki/Exclusive_or#Bitwise_operation.


-----Input-----

The first line contains a single integer $n$ ($2 \leq n \leq 400\,000$) — the number of integers in the array.

The second line contains integers $a_1, a_2, \ldots, a_n$ ($1 \leq a_i \leq 10^7$).


-----Output-----

Print a single integer — xor of all pairwise sums of integers in the given array.


-----Examples-----
Input
2
1 2

Output
3
Input
3
1 2 3

Output
2


-----Note-----

In the first sample case there is only one sum $1 + 2 = 3$.

In the second sample case there are three sums: $1 + 2 = 3$, $1 + 3 = 4$, $2 + 3 = 5$. In binary they are represented as $011_2 \oplus 100_2 \oplus 101_2 = 010_2$, thus the answer is 2.

$\oplus$ is the bitwise xor operation. To define $x \oplus y$, consider binary representations of integers $x$ and $y$. We put the $i$-th bit of the result to be 1 when exactly one of the $i$-th bits of $x$ and $y$ is 1. Otherwise, the $i$-th bit of the result is put to be 0. For example, $0101_2 \, \oplus \, 0011_2 = 0110_2$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\ninput = sys.stdin.readline \n\n\nn = int(input())\na = list(map(int, input().split()))\nb = a\n\nans = 0\nfor k in range(29):\n    a0 = []\n    a1 = []\n    a0a = a0.append\n    a1a = a1.append\n    \n    b0 = []\n    b1 = []\n    b0a = b0.append\n    b1a = b1.append\n    for i in a:\n        if i&(1<<k): a1a(i)\n        else: a0a(i)\n    for i in b:\n        if i&(1<<k): b1a(i)\n        else: b0a(i)\n    \n    a = a0+a1\n    b = b0+b1\n    mask = (1<<(k+1))-1\n    \n    aa = [i&mask for i in a]\n    bb = [i&mask for i in b]\n    \n    res = 0\n    p1 = 1<<k\n    p2 = mask+1\n    p3 = p1+p2\n\n    j1 = j2 = j3 = 0   \n    for jj, ai in enumerate(reversed(aa)):\n        while j1 < n and ai+bb[j1] < p1:\n            j1 += 1\n        while j2 < n and ai+bb[j2] < p2:\n            j2 += 1\n        while j3 < n and ai+bb[j3] < p3:\n            j3 += 1\n        res += max(n, n - jj) - max(j3, n - jj)\n        res += max(j2, n - jj) - max(j1, n - jj)\n    ans |= (res & 1) << k\n    \nprint(ans)    \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13889