#include <bits/stdc++.h>
using namespace std;
int main(){
int n, d;
scanf("%d%d", &n, &d);
int a[n];
bool f = 0;
int cnt = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
if (a[i] == d)f = 1;
if(!a[i])cnt++;
}
if(!d){
cout<<cnt<<endl;
return 0;
}
puts("0");
}