#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, s = 0, c = 0;
  cin >> n >> m;
  vector<int> q;
  int z[n];
  for (i = 0; i < n; i++) cin >> z[i];
  sort(z, z + n);
  j = 1;
  while (m > 0 && j < z[0]) {
    m = m - j;
    if (m >= 0) {
      q.push_back(j);
      c++;
    }
    j++;
  }
  i = 0;
  while (m > 0 && s == 0 && i < n - 1) {
    j = z[i] + 1;
    while (m > 0 && j < z[i + 1]) {
      m = m - j;
      if (m >= 0) {
        q.push_back(j);
        c++;
      } else {
        s = 1;
      }
      j++;
    }
    i++;
  }
  i = z[n - 1] + 1;
  while (m > 0 && i < 1000000000) {
    m = m - i;
    if (m >= 0) {
      q.push_back(i);
      c++;
    }
    i++;
  }
  cout << c << endl;
  for (i = 0; i < q.size(); i++) cout << q[i] << " ";
}
