#include <bits/stdc++.h>
using namespace std;
const long long inf = LONG_MAX;
const long long arr = 1000000;
bool comp(pair<string, long long> a, pair<string, long long> b) {
  return a.second > b.second;
}
int main(void) {
  long long n, m;
  cin >> n >> m;
  set<long long> a;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.insert(x);
  }
  vector<long long> ans;
  long long sum = 0;
  for (long long i = 1; i < 10000000; i++) {
    if (a.find(i) == a.end()) sum += i, ans.push_back(i);
    if (sum > m) {
      sum -= i;
      ans.pop_back();
      break;
    }
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
