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.awt.Point;
import java.awt.geom.Point2D;
import java.util.Comparator;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class Easy3 {
    static long mod = (long) (1e9 + 7);
    static int[] dx = {1,0,-1,0};
    static int[] dy = {0,1,0,-1};
    static int[] ddx = {1,-1,0,0,1,-1,1,-1};
    static int[] ddy = {0,0,1,-1,1,-1,-1,1};
    static double eps = 1e-6;

    static DecimalFormat df = new DecimalFormat("0.00000000");
    static long best;
    static Node[] nodes;
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        int n = sc.nextInt();
        int x = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>();
        long c = 0;
        for (int i = 0; i < n; i++) {
            int t = sc.nextInt();
            if (map.containsKey(t)) {
                c += map.get(t);
            }
            int other = t ^ x;
            if (!map.containsKey(other)) {
                map.put(other, 1);
            } else {
                map.put(other, map.get(other) + 1);
            }
        }
        out.println(c);
        out.close();
    }

    public static class Node {
        ArrayList<Integer> edges;
        public Node() {
            edges = new ArrayList<>();
        }
    }

    public static class STree {
        long[] tree;
        long[] base;
        public STree(long[] base) {
            this.base = base;
            tree = new long[2 * base.length];
            for (int i = base.length; i < tree.length; i++) {
                tree[i] = base[i - base.length];
            }
            for (int i = base.length - 1; i > 0; i--) {
                tree[i] = tree[2*i] + tree[2*i ^ 1];
            }
        }

        public long get(int index) {
            return tree[index + base.length];
        }

        public void modify(int index, long val) {
            index += base.length;
            tree[index] = val;
            while (index > 1) {
                tree[index/2] = tree[index] + tree[index ^ 1];
                index/=2;
            }
        }

        public long query(int start, int end) {
            long ans = 0;
            start += base.length;
            end += base.length + 1;
            while (start < end) {
                if ((start & 1) == 1) {
                    ans += tree[start++];
                }
                if ((end & 1) == 1) {
                    ans += tree[--end];
                }
                start>>=1;
            end>>=1;
            }
            return ans;
        }

        public void print() {
            out.println();
            for (int i = base.length; i < tree.length; i++) {
                out.print(tree[i] + " ");
            }
            out.println();
        }
    }

    public static PrintWriter out;
    /*
    int n      = sc.nextInt();        // read input as integer
    long k     = sc.nextLong();       // read input as long
    double d   = sc.nextDouble();     // read input as double
    String str = sc.next();           // read input as String
    String s   = sc.nextLine();       // read whole line as String
    out.println(result);              // print via PrintWriter
     */
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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;
        }

    }
}