We have given an array A of size N . we can select any number X and perform XOR of all the elements of array with X . we have to select X in such a way that after performing the XOR operation , the sum of array is maximized . print the number X that you must select to maximize the sum of the array . if multiple X gives the same maximum sum , then print the minimum sum X

Constraints

1 <= N <= 10^4

1 <= A[i] <= 10^18

0 <= X < 2^63

sample input

5

10 12 5 7 19

output

9223372036854775800

this question asked in microsoft interview round

Please Help