Given array A with n nonegative integers, find the amount of pairs of numbers 1 ≤ l ≤ r ≤ n such that X ≤ A[l]
xor A[l + 1]
xor ... xor A[r]
for some given integer X. xor is operation of bit addition (in binary) by modulo two. The result of this operation is one if the bits of operands are different. For example: 10[10]
xor 23[10]
= 29[10]
, 1010[2]
xor 10111[2]
= 11101[2]
, here given an equation in binary and then in decimal notation.
First line contains two integers n (1 ≤ n ≤ 10^5
) and X (0 ≤ X ≤ 10^9
). Next line contains n integers. Each number is no more than 10^9
.
Print one number - the answer to the problem.