Compute the XOR of every contiguous subsequence of A and print the sum of all those XOR values.
The XOR sum of a sequence is the value obtained by XORing all of its elements together.
Given a sequence AAA, write a program that computes the XOR sum of every contiguous subsequence of AAA and outputs the total of all those XOR sums.
The first line contains the length NNN of the sequence. (1≤N≤100 000)(1 \le N \le 100\,000)(1≤N≤100000)
The second line contains the NNN elements of AAA, separated by spaces. Each element is a non-negative integer not exceeding 10910^9109.
Print the sum of the XOR sums of all contiguous subsequences of AAA on the first line.