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>.
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
// package pkg0code;

import java.io.*;
import java.util.*;

/**
 *
 * @author Mostafa
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    
    public static class FastReaderFile
    {
        BufferedReader br;
        StringTokenizer st;
        public FastReaderFile(InputStream in)
        {
            br = new BufferedReader(new
                     InputStreamReader(in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
 public static PrintWriter out;
    
    public static int ser ( int x[] , int start , int end , int val )
    {
        while ( start <= end )
	{
            int mid = ( start + end ) / 2 ;
            if ( x[ mid ] <= val )
                start = mid + 1 ;
            else
                end = mid - 1 ;
	}
        return -1 ;
    }
    
 public static  boolean isPrime( long n)
{
    // Corner cases
    if (n < 2)  return false;
    if (n < 4)  return true;

    if (n%2 == 0 || n%3 == 0) return false;

    for (long i = 5 ; i * i <= n ; i = i + 6 )
        if ( n % i == 0 || n % ( i + 2 ) == 0)
           return false ;

    return true;
}
    
 
    
    static long gcd(long a, long b) 
    {
        return b == 0 ? (a < 0 ? -a : a) : gcd(b, a % b);
    }

    
    static long lcm(long a, long b)
    {
        long lcm = (a / gcd(a, b)) * b;
        return lcm > 0 ? lcm : -lcm ;
    }
    
    
    
    public static int search( int x[] , int val )
    {
        return ser( x , 0 , x.length - 1 , val );
    }
    public static String remove ( String s , int i )
    {
        s = s.substring(0, i) + s.substring(i+1) ;
        return s ;
    }
    public static long ret( int index  , long x[] , long y[] , long k , int prev , long h1[]  )
    {
            if ( index == x.length )
                    return 0 ;
            
            if ( h1[prev] != -1 )
                    return h1[prev];
            
            long h = ret ( index + 1  , x , y , k , prev , h1 ) , h2 = 0 ;
//            out.println(h2 + "  " + x[prev]);
            if ( Math.abs( x[prev] - x[index] )  < k )
                    h2 +=  y[index] + ret( index + 1 , x , y , k , prev , h1 ) ;
//            out.println(h2 + " then  " + x[prev]);
            return h1[prev] =   Math.max(h2, h) ;
    }
    
    //    for (Map.Entry<Integer, Integer> e : x.entrySet()) 
    //            {
    //                e.getValue() , e.getKey
   
        public static void main(String[] args) throws FileNotFoundException {
//             TODO code application logic here
            FastReader in = new FastReader();
    //        Scanner in = new Scanner(System.in) ;
    //        FastReaderFile in = new FastReaderFile(new FileInputStream("fruits.in")) ;
            StringBuilder r = new StringBuilder();
            out = new PrintWriter(new BufferedOutputStream(System.out), true) ;
            int n = in.nextInt() , k = in.nextInt() ;
            long c = 0 ;
            Map < Integer , Integer > x = new HashMap();
            while ( n-- > 0 )
            {
                    int a = in.nextInt() ;
                    if ( x.containsKey(a) )
                            x.put(a, x.get(a) + 1) ;
                    else
                            x.put(a, 1) ;
            }
            if ( k == 0 )
            {
                    for (Map.Entry<Integer, Integer> e : x.entrySet()) 
                    {
                            long y = e.getValue() ;
                            if ( y > 1 )
                            {
                                    c +=     (y)*(y-1)  /2  ;
                            }
                    }
                    out.println(c);
                    return ;
            }
            
            for (Map.Entry<Integer, Integer> e : x.entrySet()) 
            {
                     if ( x.containsKey(e.getKey() ^ k)  )
                     {
//                             out.println("excist" + e.getValue());
                             long a = e.getValue() , b = x.get(e.getKey() ^ k) ;
                             c += a * b ;
//                             out.println(c);
                     }
            }
            out.println( c / 2 ) ;
    }
}