Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

E. Beautiful Subarrays

time limit per test

3 secondsmemory limit per test

512 megabytesinput

standard inputoutput

standard outputOne day, ZS the Coder wrote down an array of integers *a* with elements *a*_{1}, *a*_{2}, ..., *a*_{n}.

A subarray of the array *a* is a sequence *a*_{l}, *a*_{l + 1}, ..., *a*_{r} for some integers (*l*, *r*) such that 1 ≤ *l* ≤ *r* ≤ *n*. ZS the Coder thinks that a subarray of *a* is beautiful if the bitwise xor of all the elements in the subarray is at least *k*.

Help ZS the Coder find the number of beautiful subarrays of *a*!

Input

The first line contains two integers *n* and *k* (1 ≤ *n* ≤ 10^{6}, 1 ≤ *k* ≤ 10^{9}) — the number of elements in the array *a* and the value of the parameter *k*.

The second line contains *n* integers *a*_{i} (0 ≤ *a*_{i} ≤ 10^{9}) — the elements of the array *a*.

Output

Print the only integer *c* — the number of beautiful subarrays of the array *a*.

Examples

Input

3 1

1 2 3

Output

5

Input

3 2

1 2 3

Output

3

Input

3 3

1 2 3

Output

2

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/17/2017 23:41:20 (c4).

Desktop version, switch to mobile version.

User lists

Name |
---|