#include <bits/stdc++.h>
const int maxn = 100000;
const long long int inf = 1000000000000000000;
using namespace std;
int n, m;
int main() {
  int cot = 0, x, ok = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x < m) cot++;
    if (x == m) ok = 1;
  }
  if (ok) {
    cout << m - cot + 1 << endl;
  } else {
    cout << m - cot << endl;
  }
  return 0;
}
