CSU-ACM Online Judge

2055: Wells‘s Lottery

      Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 50     Solved: 15    


As is known to all, Wells is impoverished.
When God heard that, God decide to help the poor Wells from terrible condition.
One day Wells met God in dream, God gave Wells a secret number which will bought Wells a great fortune and gifted Wells an ablility of transforming two lottery tickets x, y into a lottery ticket z (meet the condition that z==x or y).

Wells realized that the number must be the result of lottery, which would be worth ¥5,000,000! Wells was very excited, and can't help sharing this thought. The secret number is X, and Wells has purchase N lottery tickets $ a_1,a_2,a_3....a_N $ but has not received them yet. And if lucky enough, Wells could pick some numbers of them satisfy that $ b_1 or b_2 or b_3....or b_k=X $, k is the amount of picked numbers.

How ever the owner of the lottery shop called SDJ, who decided to modify the lottery tickets and made Wells lost his fortune. In order to save energy to modify the lottery tickets, SDJ want to know the minimum amount of modification of lottery tickets.


The input only contains one line.
First line contains two positive integers N $ (N<=10^{5}) $,X $ (X<=10^{9}) $ ,N means as described above Second line contains N number $ a_1,a_2...a_N (0<=a_i<=10^{9}), a_i $ means the number on i-th lottery tickets.


Output a line only contains minimum amount of modification of lottery tickets.

Sample Input

3 7 
4 2 1

Sample Output



It will be accepted after modifying any number.
The "or" in this problem means the bitwise or , for exmple , 0 or 0 = 0 ,0 or 1 = 1 , 1 or 1 = 1 , 3 or 5 =7.