H. 3XOR
time limit per test
1 second
memory limit per test
64 megabytes
input
standard input
output
standard output

Like every Andrew, our Andrew likes arrays. And he likes to play with arrays and search for different interesting numbers. Once he got an array of integers A. The length of the array was n. Andrew decided to choose three indexes (possibly identical to each other) i, j, k and then calculated the bitwise exclusive or of numbers A[i], A[j] and A[k]. Andrew even invented the name 3XOR for this operation. After the euphoria passed, he wondered what would happen if you took all possible unordered combinations of the indexes i, j, k, used a new operation and then added all the results. It must be some number. Help Andrew solve this problem!

Input

The first line of input contains a number n. The next line contains array A.

3 ≤ n ≤ 104

0 ≤ A[i] ≤ 106

Output

Just output the answer

Examples
Input
3
1 2 3
Output
42
Input
5
42 4 42 2 42
Output
2868