One day, ZS the Coder wrote down an array of integers a with elements a1, a2, ..., an.

A subarray of the array a is a sequence al, al + 1, ..., ar 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 ≤ 106, 1 ≤ k ≤ 109) — the number of elements in the array a and the value of the parameter k.

The second line contains n integers ai (0 ≤ ai ≤ 109) — 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
#include <bits/stdc++.h>
using namespace std;
void albus() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool asec(long long a, long long b) { return a < b; }
bool desc(long long a, long long b) { return a > b; }
bool Asec_and_desc(pair<long long, pair<long long, long long>> a,
                   pair<long long, pair<long long, long long>> b) {
  if (a.first == b.first) {
    if (a.second.first == b.second.first) {
      return a.second.second < b.second.second;
    }
    return a.second.first < b.second.first;
  }
  return a.first > b.first;
}
bool compare(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
typedef struct data {
  data *bit[2];
  long long cnt = 0;
} trie;
trie *head;
void insert(long long x) {
  trie *node = head;
  for (long long i = 30; i >= 0; i--) {
    long long cur = (x >> i) & 1;
    if (node->bit[cur] == NULL) {
      node->bit[cur] = new trie();
    }
    node = node->bit[cur];
    node->cnt++;
  }
}
long long countXor(long long x, long long q) {
  trie *node = head;
  long long ans = 0, sum = 0;
  for (long long i = 30; i >= 0; i--) {
    long long cur = (x >> i) & 1;
    long long cur2 = (q >> i) & 1;
    if (cur2 == 0) {
      if (node->bit[!cur] != NULL) ans += node->bit[!cur]->cnt;
      if (node->bit[cur] != NULL) {
        node = node->bit[cur];
      } else
        return ans;
    } else if (cur2 == 1) {
      if (node->bit[!cur] != NULL)
        node = node->bit[!cur];
      else
        return ans;
    }
  }
  ans += node->cnt;
  return ans;
}
int32_t main() {
  albus();
  head = new trie();
  insert(0);
  long long n, q;
  cin >> n >> q;
  vector<long long> A;
  for (long long i = 1; i <= n; i++) {
    long long a;
    cin >> a;
    A.push_back(a);
  }
  long long xo = 0, final = 0;
  for (long long i = 0; i < A.size(); i++) {
    xo ^= A[i];
    final += countXor(xo, q);
    insert(xo);
  }
  cout << final << endl;
}
