#include <bits/stdc++.h>
using namespace std;
const int N = 1000000 + 10;
const int M = 1000000007;
const double eps = 1e-9;
const double PI = acos(-1);
const int oo = 1000000000;
int n, k, v[N];
struct node {
  int ct = 0;
  node *ch[2] = {NULL, NULL};
} *root = new node();
void add(node *cur, int x, int u = 29) {
  ++cur->ct;
  if (u < 0) return;
  bool f = x & (1 << u);
  if (!cur->ch[f]) cur->ch[f] = new node();
  add(cur->ch[f], x, u - 1);
}
int ct(node *cur) {
  if (!cur) return 0;
  return cur->ct;
}
int get(node *cur, int x, int u = 29) {
  if (!cur) return 0;
  if (u < 0) return cur->ct;
  bool fk = (1 << u) & k;
  bool fx = (1 << u) & x;
  int ret = 0;
  if (!fk) {
    ret = ct(cur->ch[fx ^ 1]);
    ret += get(cur->ch[fx], x, u - 1);
  } else
    ret = get(cur->ch[fx ^ 1], x, u - 1);
  return ret;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) scanf("%d", &v[i]);
  int xx = 0;
  add(root, 0);
  long long ans = 0;
  for (int i = 0; i < n; ++i) {
    xx ^= v[i];
    ans += get(root, xx);
    add(root, xx);
  }
  cout << ans << endl;
  return 0;
}
