#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int i = 0, j = 0, c = 0;
  while (a[i] < x && i <= n - 1) {
    if (a[i] != j)
      c++;
    else
      i++;
    j++;
  }
  if (i < n && a[i] == x) c++;
  c += x - j;
  cout << c;
}
