#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, k;
  cin >> n >> k;
  map<int, int> m;
  for (long i = 0; i < n; ++i) {
    m[i] = 0;
  }
  for (long i = 0; i < n; ++i) {
    int x;
    cin >> x;
    m[x]++;
  }
  long count = 0;
  for (long i = 0; i < k; i++) {
    if (m[i] == 0) count++;
  }
  if (m[k] == 1) count++;
  cout << count << endl;
  return 0;
}
