#include <bits/stdc++.h>
using namespace std;
long long a[300005];
string s, p;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false);
  long long i, j, k, l, m, x, y, r, n, t;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> x;
    if (x < 300005) a[x] = 1;
  }
  long long msd = 0;
  long long cnt = 0;
  for (i = 1; i <= 300000; i++) {
    if (msd >= m) {
      break;
    }
    if (a[i] == 0) {
      if ((msd + i) <= m) {
        cnt++;
        v.push_back(i);
        msd += i;
      }
    }
  }
  cout << cnt << endl;
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
