There are some beautiful girls in Arpa’s land as mentioned before.

Once Arpa came up with an obvious problem:

Given an array and a number x, count the number of pairs of indices i, j (1 ≤ i < j ≤ n) such that <image>, where <image> is bitwise xor operation (see notes for explanation).

<image>

Immediately, Mehrdad discovered a terrible solution that nobody trusted. Now Arpa needs your help to implement the solution to that problem.

Input

First line contains two integers n and x (1 ≤ n ≤ 105, 0 ≤ x ≤ 105) — the number of elements in the array and the integer x.

Second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 105) — the elements of the array.

Output

Print a single integer: the answer to the problem.

Examples

Input

2 3
1 2


Output

1

Input

6 1
5 1 2 3 4 1


Output

2

Note

In the first sample there is only one pair of i = 1 and j = 2. <image> so the answer is 1.

In the second sample the only two pairs are i = 3, j = 4 (since <image>) and i = 1, j = 5 (since <image>).

A bitwise xor takes two bit integers of equal length and performs the logical xor operation on each pair of corresponding bits. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1. You can read more about bitwise xor operation here: <https://en.wikipedia.org/wiki/Bitwise_operation#XOR>.
import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.Map.Entry;
	
	
	 public class code {
	    //static int ans[]=new int[10];
	    static long ans=0;
	    static int flag=0;
		static double eps=(double)1e-6;
		static long mod=(long)1e9+7;
		static int maxcount=0;
		static int index=0;
		public static void main(String args[]){
			InputReader in = new InputReader(System.in);
			OutputStream outputStream = System.out;
			PrintWriter out = new PrintWriter(outputStream);
			Scanner sc=new Scanner(System.in);
			//----------My Code----------
			int n=in.nextInt();
			int x=in.nextInt();
			int a[]=new int[n];
			for(int i=0;i<n;i++){
				a[i]=in.nextInt();
			}
			HashMap<Integer,Integer> hm=new HashMap<>();
			for(int i=0;i<n;i++){
				if(!hm.containsKey(a[i]))
				hm.put(a[i],1);
				else
					hm.put(a[i], hm.get(a[i])+1);
			}
			long sum=0;
			for(int i=0;i<n;i++){
				int check=(x^a[i]);
				long ans=0;
				hm.put(a[i],hm.get(a[i])-1);
				if(hm.containsKey(check))
					ans=hm.get(check);
				sum+=ans;
			}
			System.out.println(sum);
			
			
			
			
				
			//---------------The End------------------
			out.close();
		}
		
		static void rec(long n,long a[],long count,long prev){
			for(int i=0;i<a.length;i++){
				if(n%a[i]==0&&n!=a[i]){
				rec(a[i],a,count+prev,(n/a[i])*prev);	
				}
				if(count>ans)
					ans=count;
			}
			
		}
		// A recursive function used by topologicalSort
		static void topologicalSortUtil(int a[][],int v, boolean visited[], boolean have[],Stack<Integer> Stack)
		{
		    // Mark the current node as visited.
		    visited[v] = true;
		    // Recur for all the vertices adjacent to this vertex
		    
		    for (int i = 0; i <10; ++i)
		    	 if (!visited[i]&&a[v][i]==1)
		    		 topologicalSortUtil(a,i, visited,have, Stack);
		 
		    // Push current vertex to stack which stores result
		    Stack.push(v);
		}
		// This function is a variation of DFSUytil() in http://www.geeksforgeeks.org/archives/18212
		static boolean isCyclicUtil(int a[][],int v, boolean visited[], boolean recStack[])
		{
		    if(visited[v] == false)
		    {
		        // Mark the current node as visited and part of recursion stack
		        visited[v] = true;
		        recStack[v] = true;
		 
		        // Recur for all the vertices adjacent to this vertex
		        
		        for(int i=0;i<10;i++)
		        {
		            if ( !visited[i] &&a[v][i]==1&& isCyclicUtil(a,i, visited, recStack) )
		                return true;
		            else if (recStack[i]&&a[v][i]==1)
		                return true;
		        }
		 
		    }
		    recStack[v] = false;  // remove the vertex from recursion stack
		    return false;
		}
		 
		// Returns true if the graph contains a cycle, else false.
		// This function is a variation of DFS() in http://www.geeksforgeeks.org/archives/18212
		static boolean isCyclic(int a[][])
		{
		    // Mark all the vertices as not visited and not part of recursion
		    // stack
		    boolean visited[]= new boolean[10];
		    boolean recStack[] = new boolean[10];
		 
		    // Call the recursive helper function to detect cycle in different
		    // DFS trees
		    for(int i = 0; i < 10; i++)
		        if (isCyclicUtil(a,i, visited, recStack))
		            return true;
		 
		    return false;
		}
		// The function to do Topological Sort. It uses recursive 
		// topologicalSortUtil()
		static void topologicalSort(int a[][])
		{
		    Stack<Integer> Stack=new Stack<>();
		 boolean have[]=new boolean[10];
		    // Mark all the vertices as not visited
		    boolean visited[] = new boolean[10];
		    for (int i = 0; i < 10; i++)
		        visited[i] = false;
		 
		    // Call the recursive helper function to store Topological
		    // Sort starting from all vertices one by one
		    for (int i = 0; i < 10; i++)
		      if (visited[i] == false)
		        topologicalSortUtil(a,i, visited,have, Stack);
		 
		    // Print contents of stack
		   /* while (Stack.empty() == false)
		    {
		    	if(count<10)
		        ans[count++]=Stack.peek();
		    	else{
		    		flag=1;
		    	return;
		    	}
		        Stack.pop();
		    }*/
		}
		  public static int [] topological(int adjacency_matrix[][], int source) throws NullPointerException
		    {
		        int number_of_nodes = adjacency_matrix[source].length-1;
		        int[] topological_sort = new int [number_of_nodes+1];
		        int pos = 1;
		        int j ;
		        Stack<Integer> stack=new Stack<>();
		        int visited[] = new int[number_of_nodes+1];
		        int element = source;
		        int i = source;
		        visited[source] = 1;
		        stack.push(source);
		 
		        while (!stack.isEmpty())
		        {
		            element = stack.peek();
		            while (i <= number_of_nodes)
		            {
		                if (adjacency_matrix[element][i] == 1 && visited[i] == 1)
		                {
		                    if (stack.contains(i))
		                    {
		                        System.out.println("TOPOLOGICAL SORT NOT POSSIBLE");
		                        return null;
		                    }
		                }  
		                if (adjacency_matrix[element][i] == 1 && visited[i] == 0)
		                {
		                    stack.push(i);
		                    visited[i] = 1;
		                    element = i;
		                    i = 1;
		                    continue;
		                }
		                i++;
		            }
		            j = stack.pop();	
		            System.out.println(j);
		            topological_sort[pos++] = j;
		            i = ++j;
		        }
		        return topological_sort;
		    }
			static class TrieNode{
				boolean isLeaf;
				int b;
				TrieNode[] a=new TrieNode[256];
			}
			
			static void insert(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){
				//	System.out.println(i);
					
					if(temp.a[key.charAt(i)]==null){
						temp.a[key.charAt(i)]=new TrieNode();
					}
					temp.a[key.charAt(i)].b+=1;
					temp=temp.a[key.charAt(i)];
					
				}
				temp.isLeaf=true;
			}
			static TrieNode search(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){
					
					if(temp.a[key.charAt(i)]==null)
						return null;
					temp=temp.a[key.charAt(i)];
					
				}
				return (temp);
			}
			static String max(String key,TrieNode root){
				TrieNode temp=root;
				String res="";
				for(int i=0;i<key.length();i++){
					
					if(temp.a[(key.charAt(i)-'0')^1]!=null){
					//	System.out.println("Hetr");
					temp=temp.a[(key.charAt(i)-'0')^1];
					res+="1";
					}
					else if(temp.a[(key.charAt(i)-'0')]!=null){
						//System.out.println("Hetr");
						temp=temp.a[(key.charAt(i)-'0')];
						res+="0";
					}
				}
			//	System.out.println(res+"jj");
				return res;
			}
			static void remove(String key,TrieNode root){
				TrieNode temp=root;
				for(int i=0;i<key.length();i++){
					if(temp==null)
						return;
				  if(temp.a[(key.charAt(i)-'0')]!=null&&temp.a[key.charAt(i)-'0'].b>1){
						
						temp.a[(key.charAt(i)-'0')].b--;
						
					
					temp=temp.a[(key.charAt(i)-'0')];
				}
				else
				{
					temp.a[key.charAt(i)-'0']=null;
					return;
				}
				}
				if(temp!=null)
					temp.isLeaf=false;
			}
			
			public static void printSorted(TrieNode node, String s) {
		        for (int ch = 0; ch < node.a.length; ch++) {
		            TrieNode child = node.a[ch];
		            if (child != null){
		                printSorted(child, s + (char)(ch));
		            }
		        }
		        if (node.isLeaf) {
		            System.out.println(s);
		        }
		    }
		private static void permutation(String prefix, String str,HashSet<String> hs) {
		    int n = str.length();
		    if (n == 0) hs.add(prefix);
		    else {
		        for (int i = 0; i < n; i++)
		            permutation(prefix + str.charAt(i), str.substring(0, i) + str.substring(i+1, n),hs);
		    }
		}
		
		
		static int recursiveBinarySearch(int[] sortedArray, int start, int end, int key) {
	
		while (start < end) {
				int mid = start + (end - start) / 2; 
				if (key < sortedArray[mid]) {
					end=mid-1;
	
				} else if (key >=sortedArray[mid]) {
					start=mid+1;
				}
			}
			return (start); 
		}
	
		static long modulo(long a,long b,long c) {
			long x=1;
			long y=a;
			while(b > 0){
				if(b%2 == 1){
					x=(x*y)%c;
				}
			
				y = (y*y)%c; // squaring the base
				b /= 2;
			}
			return  x%c;
		}
		
		
		static long gcd(long x, long y)
		
		{
			long r=0, a, b;
			a = (x > y) ? x : y; // a is greater number
			b = (x < y) ? x : y; // b is smaller number
			r = b;
			while(a % b != 0)
			{
				r = a % b;
				a = b;
				b = r;
			}
			return r;
		}
		static class Pair implements Comparable<Pair> {
			int x;
			int y;
			//int i;
			Pair(int  xx,int yy){
				
				x=xx;
				y=yy;
				//i=ii;
			}
			@Override
			public int compareTo(Pair arg0) {
			
				return 1;
				
					
				
				
			}
		
		}
		static class InputReader {
			public BufferedReader reader;
			public StringTokenizer tokenizer;
	
			public InputReader(InputStream inputstream) {
				reader = new BufferedReader(new InputStreamReader(inputstream));
				tokenizer = null;
			}
	
			public String nextLine(){
				String fullLine=null;
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					try {
						fullLine=reader.readLine();
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
					return fullLine;
				}
				return fullLine;
			}
			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 long nextLong() {
				return Long.parseLong(next());
			}
			public int nextInt() {
				return Integer.parseInt(next());
			}
		}
	}