#include <bits/stdc++.h>
using namespace std;
const long int z = 1000000007;
long long int h[1000009], a[1000009];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<pair<string, string> > p;
  std::set<int> myset;
  std::set<int>::iterator it;
  long long int n, m, i, x = 0, y, v, j, d, c, k = 0, max = 0, sum = 0,
                         flag = 0;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    cin >> x;
    myset.insert(x);
  }
  x = 1;
  while (sum <= m) {
    it = myset.begin();
    if (*it != x) {
      sum += x;
      if (sum <= m) {
        a[k] = x;
        k++;
      }
    } else {
      myset.erase(it);
    }
    x++;
  }
  cout << k << endl;
  for (i = 0; i < k; i++) cout << a[i] << " ";
}
