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.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UncheckedIOException;
import java.util.Arrays;

public class Main {

	private static final int MOD = 1000000007;
	private static final int intINF = Integer.MAX_VALUE;
	private static final long longINF = Long.MAX_VALUE;

	private static void solve() {
		int n =sc.nextInt(),x=sc.nextInt();
		int[] a = new int[100000+1];
		long answer = 0;
		for(int i=0;i<n;i++) {
			int o = sc.nextInt();
			answer+=a[(o^x)<=100000?o^x:0];
			a[o]++;
		}
		pw.print(answer);
	}

	// TEMPLATE

	private static myScanner sc;
	private static PrintWriter pw;

	private static final int numberOfTests = 1;

	private static final String nameOfInAndOutFile = "";
	private static final String fullNameInputFile = nameOfInAndOutFile + ".in";
	private static final String fullNameOutputFile = nameOfInAndOutFile + ".out";

	public static void main(String[] args) throws IOException {
		if (nameOfInAndOutFile.length() == 0) {
			setDefaultInAndOutPut();
		} else {
			setInAndOutPutFromFile();
		}
		for (int test = 1; test <= numberOfTests; test++) {
			solve();
			pw.flush();
		}

		pw.close();
	}

	private static void setDefaultInAndOutPut() {
		sc = new myScanner(new BufferedReader(new InputStreamReader(System.in)));
		pw = new PrintWriter(System.out);
	}

	private static void setInAndOutPutFromFile() throws IOException {
		sc = new myScanner(new BufferedReader(new FileReader(new File(fullNameInputFile))));
		pw = new PrintWriter(new File(fullNameOutputFile));
	}
}

class myScanner {
	private char[] buffer = new char[1 << 8];
	private int pos = 1;

	private BufferedReader reader;

	public myScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public boolean hasNext() {
		return pos > 0;
	}

	private void loadBuffer() {
		pos = 0;
		try {
			for (int i; (i = reader.read()) != -1;) {
				char c = (char) i;
				if (c != ' ' && c != '\n' && c != '\t' && c != '\r' && c != '\f') {
					if (pos == buffer.length)
						buffer = Arrays.copyOf(buffer, 2 * pos);
					buffer[pos++] = c;
				} else if (pos != 0)
					break;
			}
		} catch (IOException e) {
			throw new UncheckedIOException(e);
		}
	}

	public String current() {
		return String.copyValueOf(buffer, 0, pos);
	}

	public String next() {
		loadBuffer();
		return current();
	}

	public String nextLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new UncheckedIOException(e);
		}
	}

	public int nextInt() {
		return nextInt(10);
	}

	public long nextLong() {
		return nextLong(10);
	}

	public int nextInt(int radix) {
		loadBuffer();
		int result = 0;
		int i = buffer[0] == '-' || buffer[0] == '+' ? 1 : 0;
		for (checkValidNumber(pos > i); i < pos; i++) {
			int digit = buffer[i] - '0';
			checkValidNumber(0 <= digit && digit <= radix - 1);
			result = result * radix + digit;
		}
		return buffer[0] == '-' ? -result : result;
	}

	public long nextLong(int radix) {
		loadBuffer();
		long result = 0;
		int i = buffer[0] == '-' || buffer[0] == '+' ? 1 : 0;
		for (checkValidNumber(pos > i); i < pos; i++) {
			int digit = buffer[i] - '0';
			checkValidNumber(0 <= digit && digit <= radix - 1);
			result = result * radix + digit;
		}
		return buffer[0] == '-' ? -result : result;
	}

	public int[] nextArrayInts(int size) {
		int[] input = new int[size];
		for (int i = 0; i < size; i++)
			input[i] = nextInt();
		return input;
	}

	public long[] nextArrayLongs(int size) {
		long[] input = new long[size];
		for (int i = 0; i < size; i++)
			input[i] = nextLong();
		return input;
	}

	public double nextDouble() {
		loadBuffer();
		long result = 0;
		int i = buffer[0] == '-' || buffer[0] == '+' ? 1 : 0;
		long round = 1;
		final int radix = 10;
		boolean hasPoint = false;
		for (checkValidNumber(pos > i); i < pos; i++) {
			int digit = buffer[i] - '0';
			checkValidNumber((0 <= digit && digit <= radix - 1) || (!hasPoint && digit == -2));
			if (digit == -2)
				hasPoint = true;
			else {
				if (hasPoint)
					round *= radix;
				result = result * radix + digit;
			}

		}
		return buffer[0] == '-' ? -result / (1.0 * round) : result / (1.0 * round);
	}

	private void checkValidNumber(boolean condition) {
		if (!condition)
			throw new NumberFormatException(current());
	}
}