#include <bits/stdc++.h>
using namespace std;
template <class T>
T &get(T &n) {
  cin >> n;
  return n;
}
const long long hell = 1000000007;
const long long INF = (long long)hell * hell;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int N, i, M;
  cin >> N >> M;
  vector<int> A(N), ans;
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  int j = 1;
  for (int i = 0; i < N; ++i) {
    while (j < A[i] && M - j >= 0) {
      ans.push_back(j);
      M -= j;
      ++j;
    }
    j = A[i] + 1;
  }
  j = A[N - 1] + 1;
  while (M - j >= 0) {
    ans.push_back(j);
    M -= j;
    ++j;
  }
  cout << ans.size() << "\n";
  for (auto X : ans) {
    cout << X << " ";
  }
  cout << "\n";
}
