#include <bits/stdc++.h>
using namespace std;
struct node {
  node *a[2];
  int count;
  node() {
    a[0] = a[1] = NULL;
    count = 0;
  }
};
node *root = NULL;
void insert(int ele) {
  if (root == NULL) root = new node();
  node *ptr = root;
  for (int i = 30; i >= 0; i--) {
    int k = (ele & (1 << i)) ? 1 : 0;
    if (ptr->a[k] == NULL) ptr->a[k] = new node();
    ptr = ptr->a[k];
    ptr->count++;
  }
}
int getCount(node *ptr) {
  if (ptr) return ptr->count;
  return 0;
}
int find(int ele, int k) {
  int ans = 0;
  node *ptr = root;
  for (int i = 30; i >= 0; i--) {
    int aa = (ele & (1 << i)) ? 1 : 0;
    int bb = (k & (1 << i)) ? 1 : 0;
    if (bb == 0) ans += getCount(ptr->a[aa ^ 1]);
    ptr = ptr->a[aa ^ bb];
    if (ptr == NULL) break;
  }
  ans += getCount(ptr);
  return ans;
}
int arr[1000002];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    arr[i] ^= arr[i - 1];
  }
  insert(0);
  long long int ans = 0;
  for (int i = 1; i <= n; i++) {
    int ele = arr[i];
    ans += find(ele, k);
    insert(ele);
  }
  cout << ans;
  return 0;
}
