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>
using namespace std;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
const long long mod = 1e9 + 7;
template <typename T = unsigned int, int B = 32>
struct BinaryTrie {
 private:
  struct Node {
    int cnt;
    T lazy;
    Node* ch[2] = {};
    Node() : cnt(0), lazy(0) {}
  };
  Node* root;
  int size(Node* t) { return t ? t->cnt : 0; }
  void eval(Node* t, int bit_index) {
    if (!t->lazy) return;
    if (t->lazy >> bit_index) swap(t->ch[0], t->ch[1]);
    if (t->ch[0]) t->ch[0]->lazy ^= t->lazy;
    if (t->ch[1]) t->ch[1]->lazy ^= t->lazy;
    t->lazy = 0;
  }
  Node* insert(Node* t, T n, int bit_index) {
    if (!t) t = new Node;
    t->cnt += 1;
    if (bit_index == -1) return t;
    eval(t, bit_index);
    bool c = (n >> bit_index) & 1;
    t->ch[c] = insert(t->ch[c], n, bit_index - 1);
    return t;
  }
  Node* erase(Node* t, T n, int bit_index) {
    t->cnt -= 1;
    if (!t->cnt) return nullptr;
    if (bit_index == -1) return t;
    eval(t, bit_index);
    bool c = (n >> bit_index) & 1;
    t->ch[c] = erase(t->ch[c], n, bit_index - 1);
    return t;
  }
  T get_min(Node* t, T n, int bit_index) {
    if (bit_index < 0) return 0;
    eval(t, bit_index);
    bool c = (n >> bit_index) & 1;
    T ret = 0;
    if (!t->ch[c]) c ^= 1;
    return get_min(t->ch[c], n, bit_index - 1) | ((T)c << bit_index);
  }
  T get(Node* t, T n, int k, int bit_index) {
    if (bit_index < 0) return 0;
    eval(t, bit_index);
    bool c = (n >> bit_index) & 1;
    if (size(t->ch[c]) < k) k -= size(t->ch[c]), c ^= 1;
    return get(t->ch[c], n, k, bit_index - 1) | ((T)c << bit_index);
  }
  int count_lower(Node* t, T n, T val, int bit_index) {
    if (!t || bit_index < 0) return 0;
    eval(t, bit_index);
    bool c = (n >> bit_index) & 1;
    int ret = 0;
    if ((val >> bit_index) & 1) ret += size(t->ch[c]), c ^= 1;
    return ret + count_lower(t->ch[c], n, val, bit_index - 1);
  }

 public:
  BinaryTrie() : root(nullptr) {}
  int size() { return size(root); }
  bool empty() { return !root; }
  void insert(T n) { root = insert(root, n, B - 1); }
  void erase(T n) { root = erase(root, n, B - 1); }
  void xor_all(T n) {
    if (root) root->lazy ^= n;
  }
  T max_element(T bias = 0) { return get_min(root, ~bias, B - 1); }
  T min_element(T bias = 0) { return get_min(root, bias, B - 1); }
  int lower_bound(T x, T bias = 0) { return count_lower(root, bias, x, B - 1); }
  int upper_bound(T x, T bias = 0) {
    return count_lower(root, bias, x + 1, B - 1);
  }
  int count(T x) { return upper_bound(x) - lower_bound(x); }
  T get(int k, T bias = 0) { return get(root, bias, k + 1, B - 1); }
  T operator[](int k) { return get(k); }
};
int main() {
  int n, k;
  cin >> n >> k;
  BinaryTrie<> bt;
  bt.insert(0);
  long long ans = 0;
  int sum = 0;
  for (int i = (int)0; i < (int)n; ++i) {
    int a;
    cin >> a;
    sum ^= a;
    ans += (i + 1) - bt.lower_bound(k, sum);
    bt.insert(sum);
  }
  cout << ans << endl;
}
