#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int n, m, ans, a[maxn];
inline int read() {
  int x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  return x;
}
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + 1 + n);
  a[0] = -1;
  int i;
  for (i = 1; i <= n; i++)
    if (a[i] <= m)
      ans += a[i] - a[i - 1] - 1;
    else
      break;
  if (a[i - 1] != m)
    ans += m - a[i - 1] - 1;
  else
    ans++;
  printf("%d\n", ans);
  return 0;
}
