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>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
unsigned seed = chrono::system_clock::now().time_since_epoch().count();
mt19937 ran(seed);
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int f = 0;
  cerr << '{';
  for (auto& i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
clock_t start = clock();
int gcd(int a, int b) { return (a == 0) ? b : gcd(b % a, a); }
int power(int a, int n) {
  int p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
    }
    n >>= 1;
    a *= a;
  }
  return p;
}
int powm(int a, int n, int mod_) {
  int p = 1;
  while (n) {
    if (n % 2) {
      p = (((p % mod_) * 1LL * (a % mod_)) % mod_);
    }
    n >>= 1;
    a = (((a % mod_) * 1LL * (a % mod_)) % mod_);
  }
  return p % mod_;
}
int powi(int a, int mod_) { return powm(a, mod_ - 2, mod_); }
const int WL = 2;
struct Node {
  Node* bit[WL] = {NULL};
  int cnt = 0;
};
Node* head = new Node();
void Add(int x) {
  Node* cur = head;
  for (int i = 30; i >= 0; --i) {
    int b = ((x >> i) & 1);
    if (!cur->bit[b]) cur->bit[b] = new Node();
    cur = cur->bit[b];
    cur->cnt++;
  }
}
void Rem(int x) {
  Node* cur = head;
  for (int i = 30; i >= 0; --i) {
    int b = ((x >> i) & 1);
    cur = cur->bit[b];
    cur->cnt--;
  }
}
int maxxor(int x) {
  int ans = 0;
  Node* cur = head;
  for (int i = 30; i >= 0; --i) {
    int b = (x >> i) & 1;
    if (cur->bit[!b] and cur->bit[!b]->cnt > 0) {
      ans += (1 << i);
      cur = cur->bit[!b];
    } else
      cur = cur->bit[b];
  }
  return ans;
}
long long int get(int x, int k) {
  long long int ans = 0;
  Node* cur = head;
  for (int i = 30; i >= 0; --i) {
    int b = (x >> i) & 1;
    int c = (k >> i) & 1;
    if (b == 0 and c == 1) {
      if (cur->bit[1])
        cur = cur->bit[1];
      else
        break;
    } else if (b == 1 and c == 0) {
      if (cur->bit[0]) ans += 1LL * (cur->bit[0]->cnt);
      if (cur->bit[1])
        cur = cur->bit[1];
      else
        break;
    } else if (b == 1 and c == 1) {
      if (cur->bit[0])
        cur = cur->bit[0];
      else
        break;
    } else if (b == 0 and c == 0) {
      if (cur->bit[1]) ans += 1LL * (cur->bit[1]->cnt);
      if (cur->bit[0])
        cur = cur->bit[0];
      else
        break;
    }
  }
  return ans;
}
bool search(int x) {
  Node* cur = head;
  for (int i = 30; i >= 0; --i) {
    int b = (x >> i) & 1;
    if (!cur->bit[b] or cur->bit[b]->cnt == 0) return false;
    cur = cur->bit[b];
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int mn, mx;
  int n, m, k, t, i, j, sum = 0, flag = 0, cnt = 0;
  int x = 0, y = 0, z, l = 0, r = 0, q;
  int TC = 1;
  while (TC--) {
    cin >> n >> k;
    --k;
    int pr = 0;
    long long int ans = 0;
    Add(0);
    for (i = 0; i < n; ++i) {
      cin >> x;
      pr ^= x;
      ans += get(pr, k);
      ;
      Add(pr);
    }
    cout << ans;
  };
  return 0;
}
