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
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        int tid;
        int[] sz;
        int[][] nxt;

        void insert(int x) {
            int crt = 0;
            for (int i = 31; i >= 0; --i) {
                int ch = (x >> i) & 1;
                if (nxt[ch][crt] == 0) {
                    nxt[ch][crt] = ++tid;
                }
                crt = nxt[ch][crt];
                ++sz[crt];
            }
        }

        int query(int x, int K) {
            int ret = 0, crt = 0;
            for (int i = 31; i >= 0; --i) {
                int ch = (x >> i) & 1, lim = (K >> i) & 1;
                if (lim == 1) {
                    crt = nxt[ch ^ 1][crt];
                } else {
                    ret += sz[nxt[ch ^ 1][crt]];
                    crt = nxt[ch][crt];
                }
                if (crt == 0 || sz[crt] == 0) {
                    break;
                }
            }
            ret += sz[crt];
            return ret;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt(), K = in.nextInt();
            int[] a = new int[N + 1], s = new int[N + 1];
            a[0] = s[0] = 0;
            for (int i = 1; i <= N; ++i) {
                a[i] = in.nextInt();
                s[i] = s[i - 1] ^ a[i];
            }
            nxt = new int[2][N * 32 + 10];
            sz = new int[N * 32 + 10];
            tid = 0;
            insert(s[0]);
            long ans = 0;
            for (int i = 1; i <= N; ++i) {
                ans += query(s[i], K);
                //System.err.println("ans = " + ans);
                insert(s[i]);
            }
            out.println(ans);
        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

