#include <bits/stdc++.h>
using namespace std;
const int MAXR = 1e6 - 1;
map<int, bool> has;
vector<int> p;
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    has[x] = 1;
  }
  int sum = 0;
  for (int a = 1; a <= 1e9 - 1; a++) {
    if (sum >= M || a >= M || a + sum >= M) {
      if (a + sum <= M && !has[a]) p.push_back(a);
      break;
    }
    if (a >= MAXR || has[a]) continue;
    if (sum + a <= M) {
      sum += a;
      p.push_back(a);
    }
  }
  cout << p.size() << endl;
  for (int a = 0; a < p.size(); a++) cout << p[a] << " ";
  return 0;
}
