#include <bits/stdc++.h>
using namespace std;
unsigned long long factorial(unsigned long long n) {
  if (n == 0) return 1;
  return n * factorial(n - 1);
}
long long fastPow(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  while (b > 0) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long power(long long x, unsigned long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
long long powerofnumber(long long n, long long k) {
  long long c = 0;
  while (n > 0) {
    if (n % k == 0) {
      c++;
      n = n / k;
    } else {
      break;
    }
  }
  return c;
}
long long sumdigit(long long n) {
  long long s = 0;
  while (n > 0) {
    s = s + n % 10;
    n = n / 10;
  }
  return s;
}
bool isSubArray(long long A[], long long B[], long long n, long long m) {
  long long i = 0, j = 0;
  while (i < n && j < m) {
    if (A[i] == B[j]) {
      i++;
      j++;
      if (j == m) return true;
    } else {
      i = i - j + 1;
      j = 0;
    }
  }
  return false;
}
long long isPalindrome(string s) {
  long long l = 0;
  long long h = s.length() - 1;
  while (h > l) {
    if (s[l++] != s[h--]) {
      return 0;
    }
  }
  return 1;
}
long long isRBS(string s) {
  long long n = s.length();
  long long o = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(')
      o++;
    else {
      o--;
      if (o < 0) return 0;
    }
  }
  if (o != 0)
    return 0;
  else
    return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  for (long long i = 0; i < t; i++) {
    long long n, mm;
    cin >> n >> mm;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long c = 0;
    map<long long, long long> m;
    for (long long i = 0; i < 1000001; i++) {
      m[i] = 0;
    }
    for (long long i = 0; i < n; i++) m[a[i]]++;
    long long w = 1;
    vector<long long> v;
    long long ans = 0;
    while (c < mm && w < 1000001) {
      if (m[w] == 0 && c + w <= mm) {
        c = c + w;
        ans++;
        v.push_back(w);
      }
      w++;
    }
    cout << ans << "\n";
    for (auto x : v) cout << x << " ";
  }
}
