#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define all(v) v.begin(),v.end()
#define t int t;cin>>t; while(t--)
#define out(a,n) for(int i=0;i<n;i++){cout<<a[i]<< " ";}
#define FAST ios_base::sync_with_stdio(false), cin.tie(NULL);
using namespace std;
using pll = pair<ll, ll>;
int main ()
{
FAST;
// t
{
ll n,d;
cin>>n>>d;
ll a[n];
bool f=0;
for (int i=0; i<n; i++)
{
cin>>a[i];
if (a[i]==d)
{
f=1;
break;
}
}
if (f)
cout<<1<<endl;
else
cout<<0<<endl;
}
}