#include <bits/stdc++.h>
using namespace std;
const int N = (int)3e5 + 1;
bool A[N];
void solve() {
  int n, m, i, t;
  cin >> n >> m;
  vector<int> v;
  A[0] = true;
  for (i = 0; i < n; i++) {
    cin >> t;
    if (t < N) A[t] = true;
  }
  i = 0;
  while (true) {
    while (A[i] == true) i++;
    if (m >= i) {
      v.push_back(i);
      m -= i;
      i++;
    } else
      break;
  }
  cout << v.size() << "\n";
  for (auto it : v) cout << it << " ";
  cout << "\n";
}
int main() {
  solve();
  return 0;
}
