Vitaliy and Sequence
Vitaliy, like his friend Vasylko, has decided to explore bitwise operations. He randomly selects N numbers: a_1, a_2, ..., a_N, and begins his "experiments" on this sequence. The process of these experiments is as follows: he repeatedly asks Vasylko to choose two numbers x and y, where 1 ≤ x, y ≤ N, and then he updates the element a_x to the value a_x XOR a_y.
After completing all these "experiments," he calculates the sum of all elements in the sequence. What is the maximum sum he can achieve?
Input
The first line contains the number N, where 1 ≤ N ≤ 200.
The second line contains N numbers: a_1, a_2, ..., a_N, with each a_i satisfying 1 ≤ a_i ≤ 10^15, and 1 ≤ i ≤ N.
Output
Output a single number, which is the maximum possible sum of the sequence that Vitaliy can achieve after his "experiments".