#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, mex;
  cin >> n >> mex;
  vector<int> arr(n);
  int mx = 101;
  bool have_mex = false;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == mex) have_mex = true;
  }
  sort(arr.begin(), arr.end());
  int cnt = 0;
  for (int i = 0; i < n && arr[i] < mex; i++) {
    cnt++;
  }
  int ans = mex - cnt;
  cout << ans + have_mex;
  return 0;
}
