#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, m, answer = 0;
  vector<long int> t, res;
  cin >> n >> m;
  long int temp, andis = 0;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    t.push_back(temp);
  }
  sort(t.begin(), t.end());
  for (long int i = 1; true; i++) {
    if (andis < t.size()) {
      if (i == t[andis]) {
        andis++;
        continue;
      } else {
        answer += i;
        res.push_back(i);
      }
    } else {
      answer += i;
      res.push_back(i);
    }
    if (answer >= m) break;
  }
  if (answer == m) {
    cout << res.size() << endl;
    for (int i = 0; i < res.size(); i++) {
      if (i == res.size() - 1)
        cout << res[i];
      else
        cout << res[i] << " ";
    }
  } else {
    cout << res.size() - 1 << endl;
    for (int i = 0; i < res.size() - 1; i++) {
      if (i == res.size() - 2)
        cout << res[i];
      else
        cout << res[i] << " ";
    }
  }
  cout << endl;
  return 0;
}
