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.*;
import java.util.*;
import java.math.*;
import java.util.concurrent.*;

public final class beautiful_subs
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static int ctr=0,LN=30;
	static int maxn=(int)(LN*(1e6));
	static int[][] trie=new int[2][maxn];
	static int[] arr=new int[maxn];
	
	static void insert(int num)
	{
		int root=0;
		
		for(int i=LN-1;i>=0;i--)
		{
			int bit=0;
			
			if((num&(1<<i))!=0)
			{
				bit=1;
			}
			
			int next=trie[bit][root];
			
			if(next==-1)
			{
				trie[bit][root]=next=++ctr;
			}
			
			root=next;arr[root]++;
		}
	}
	
	static int query(int curr,int k)
	{
		int ret=0,root=0;
		
		for(int i=LN-1;i>=0;i--)
		{
			if(root==-1)
			{
				return ret;
			}
			
			int bit1=0,bit2=0;
			
			if((k&(1<<i))!=0)
			{
				bit1=1;	
			}
			
			if((curr&(1<<i))!=0)
			{
				bit2=1;
			}
			
			if(bit1==1)
			{
				ret+=get(trie[bit2][root]);
				
				int next=trie[1-bit2][root];
				
				root=next;
			}
			
			else
			{
				int next=trie[bit2][root];
				
				root=next;
			}
		}
		
		return ret;
	}
	
	static int get(int node)
	{
		return (node!=-1?arr[node]:0);
	}
	
    public static void main(String args[]) throws Exception
    {
		int n=sc.nextInt(),k=sc.nextInt();int[] a=new int[n+1];
		
		for(int i=0;i<2;i++)
		{
			Arrays.fill(trie[i],-1);
		}
		
		for(int i=1;i<=n;i++)
		{
			a[i]=sc.nextInt();
		}
		
		int curr=0;long res=0;
		
		for(int i=0;i<=n;i++)
		{
			curr^=a[i];
			
			int zz=query(curr,k);
			
			res+=(i-zz);
			
			insert(curr);
		}
		
		out.println(res);out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}