#include <bits/stdc++.h>
using namespace std;
struct Node {
  Node *next[2];
  int freq;
  Node() {
    next[0] = next[1] = NULL;
    freq = 0;
  }
} * Trie;
const int N = 1e6, B = 30;
int n, a[N], k;
void insert(int n) {
  Node *cur = Trie;
  for (int i = B - 1; i >= 0; --i) {
    int b = (n >> i) & 1;
    if (cur->next[b] == NULL) cur->next[b] = new Node();
    cur = cur->next[b];
    ++cur->freq;
  }
}
long long find(int n) {
  Node *cur = Trie;
  long long res = 0;
  for (int i = B - 1; i >= 0; --i) {
    if (cur == NULL) break;
    int b = (n >> i) & 1, need = (k >> i) & 1;
    if (need == 1)
      cur = cur->next[b ^ 1];
    else {
      if (cur->next[b ^ 1] != NULL) res += cur->next[b ^ 1]->freq;
      cur = cur->next[b];
    }
  }
  if (cur != NULL) res += cur->freq;
  return res;
}
int main(int argc, char **argv) {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  long long res = 0;
  Trie = new Node();
  insert(0);
  int xr = 0;
  for (int i = 0; i < n; ++i) {
    xr ^= a[i];
    insert(xr);
    res += find(xr);
  }
  printf("%lld\n", res);
  return 0;
}
