#include <bits/stdc++.h>
using namespace std;
set<int> s;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    s.insert(x);
  }
  int cont = 1;
  vector<int> ans;
  while (s.count(cont)) {
    cont++;
  }
  while (m - cont >= 0) {
    m -= cont;
    ans.push_back(cont);
    s.insert(cont);
    while (s.count(cont)) {
      cont++;
    }
  }
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); ++i) {
    printf("%d ", ans[i]);
  }
  puts("");
  return 0;
}
