#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  scanf("%d%d", &n, &x);
  int ar[n];
  for (int i = 0; i < n; i++) scanf("%d", &ar[i]);
  sort(ar, ar + n);
  int op = 0;
  for (int i = 0; i < x; i++) {
    int lo = 0, hi = n - 1, mid, fl = 0;
    while (lo <= hi) {
      mid = lo + (hi - lo) / 2;
      if (ar[mid] == i) {
        fl = 1;
        break;
      } else if (ar[mid] < i)
        lo = mid + 1;
      else
        hi = mid - 1;
    }
    if (fl == 0) op++;
  }
  int lo = 0, hi = n - 1, mid, fl = 0;
  while (lo <= hi) {
    mid = lo + (hi - lo) / 2;
    if (ar[mid] == x) {
      fl = 1;
      break;
    } else if (ar[mid] < x)
      lo = mid + 1;
    else
      hi = mid - 1;
  }
  if (fl == 1) op++;
  cout << op << endl;
  return 0;
}
