eolymp
bolt
Try our new interface for solving problems
Problems

One more problem with XOR

One more problem with XOR

Given array A with n nonegative integers, find the amount of pairs of numbers 1lrn such that XAl xor Al+1 xor ... xor Ar 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: 1010 xor 2310 = 2910, 10102 xor 101112 = 111012, here given an equation in binary and then in decimal notation.

Input

First line contains two integers n (1n105) and X (0X109). Next line contains n integers. Each number is no more than 109.

Output

Print one number - the answer to the problem.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
5 0
1 2 3 4 5
Output example #1
15
Input example #2
3 3
1 2 3
Output example #2
2
Source 2014 Казахстан, 4-й этап Республиканской олимпиады по информатике, Усть-Каменогорск, Март, Задача D