#include <bits/stdc++.h>
using namespace std;
int n, a[1001], x, res = 0, k = 0, m = 0;
int mex() {
  int dd[1001] = {0};
  for (int i = 1; i <= n; ++i) {
    dd[a[i]] = 1;
  }
  for (int i = 0; i <= 100; ++i) {
    if (dd[i] == 0) {
      return i;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> x;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] < x) {
      m++;
    }
    if (a[i] == x) {
      k = 1;
    }
  }
  if (mex() == x) {
    cout << 0;
  } else {
    cout << (x - m) + k;
  }
}
