#include<iostream>
using namespace std;
long long n,k,a[100],cnt,fact[21];
int main(){
cin>>n>>k;for(int i=0;i<n;i++)cin>>a[i];
fact[1]=1;for(int i=2;i<=20;i++){fact[i]=fact[i-1]*i;fact[i]%=1000000007;}
for(int i=1;i<(1<<n);i++){
int r=0,s=0;for(int j=0;j<n;j++){if((i/(1<<j))%2==1){s++;r^=a[j];}}
if(r==k){cnt+=fact[s];cnt%=1000000007;}
}
cout<<cnt<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmxvbmcgbG9uZyBuLGssYVsxMDBdLGNudCxmYWN0WzIxXTsKaW50IG1haW4oKXsKCWNpbj4+bj4+aztmb3IoaW50IGk9MDtpPG47aSsrKWNpbj4+YVtpXTsKCWZhY3RbMV09MTtmb3IoaW50IGk9MjtpPD0yMDtpKyspe2ZhY3RbaV09ZmFjdFtpLTFdKmk7ZmFjdFtpXSU9MTAwMDAwMDAwNzt9Cglmb3IoaW50IGk9MTtpPCgxPDxuKTtpKyspewoJCWludCByPTAscz0wO2ZvcihpbnQgaj0wO2o8bjtqKyspe2lmKChpLygxPDxqKSklMj09MSl7cysrO3JePWFbal07fX0KCQlpZihyPT1rKXtjbnQrPWZhY3Rbc107Y250JT0xMDAwMDAwMDA3O30KCX0KCWNvdXQ8PGNudDw8ZW5kbDsKCXJldHVybiAwOwp9