#include <bits/stdc++.h>
using namespace std;
const int N = 2;
const int M = 32;
const int MX = 1e6 + 500;
int i, j, n, k;
long long sum[MX];
struct Trie {
  Trie* next[N];
  long long v;
  Trie() {
    for (int i = 0; i < N; i++) next[i] = NULL;
    v = 0;
  }
};
void Add(long long x, Trie* root) {
  Trie* p = root;
  int id;
  for (int i = M - 1; i >= 0; i--) {
    id = (((1ll << i) & x) >= 1);
    if (p->next[id] == NULL) p->next[id] = new Trie;
    p = p->next[id];
    p->v++;
  }
}
long long dfs(Trie* root, long long sm, int bit) {
  long long ans = 0;
  int bitk, bitsm;
  Trie* p = root;
  if (p == NULL) return 0;
  if (bit == -1) return p->v;
  bitk = (((1ll << bit) & k) >= 1);
  bitsm = (((1ll << bit) & sm) >= 1);
  if (bitk == 1) {
    if (bitsm == 1)
      ans += dfs(p->next[0], sm, bit - 1);
    else {
      ans += dfs(p->next[1], sm, bit - 1);
    }
  } else {
    if (bitsm == 1) {
      if (p->next[0] != NULL) ans += p->next[0]->v;
      ans += dfs(p->next[1], sm, bit - 1);
    } else {
      if (p->next[1] != NULL) ans += p->next[1]->v;
      ans += dfs(p->next[0], sm, bit - 1);
    }
  }
  return ans;
}
void del(Trie* root) {
  for (int i = 0; i < N; i++)
    if (root->next[i] != NULL) del(root->next[i]);
  free(root);
}
int main() {
  long long ans = 0;
  Trie* root = new Trie;
  ans = 0;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &sum[i]);
    if (i) sum[i] ^= sum[i - 1];
    ans += dfs(root, sum[i], 31);
    Add(sum[i], root);
    if (sum[i] >= k) ans++;
  }
  cout << ans << endl;
  del(root);
  return 0;
}
