#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, mex, c = 0, i, p = 0;
  cin >> n >> mex;
  vector<int> v(n);
  for (i = 0; i < n; i++) {
    scanf("%d", &v[i]);
  }
  for (i = 0; i < n; i++) {
    if (v[i] <= mex) c++;
    if (v[i] == mex) p = 1;
  }
  if (mex != 0) {
    if (p == 0)
      printf("%d", (mex - c));
    else
      printf("%d", (mex - c + 2));
  } else {
    if (p == 0)
      printf("0");
    else
      printf("1");
  }
  return 0;
}
