#include <bits/stdc++.h>
using namespace std;
bitset<1000000010> bit;
int main() {
  int n, m, x, p = 1;
  vector<int> arr;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    bit[x] = 1;
  }
  while (m - p >= p + 1) {
    if (!bit[p]) {
      bit[p] = 1;
      arr.push_back(p);
      m -= p;
    }
    p++;
  }
  if (m) {
    p = m;
    while (bit[p] and p > 0) {
      p--;
    }
    if (p) arr.push_back(p);
  }
  printf("%d\n", arr.size());
  for (int i = 0; i < arr.size(); i++) {
    printf("%d", arr[i]);
    if (i != arr.size() - 1) printf(" ");
  }
}
