#include <bits/stdc++.h>
using namespace std;
vector<int> v1;
vector<vector<int>> comp;
vector<int> onecycle;
vector<int> clength;
int cycle_start;
int cycle_end;
vector<int> vbip1;
vector<int> vbip2;
int bin(vector<int> arr, int l, int r, int x) {
  if (r >= l) {
    int mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return bin(arr, l, mid - 1, x);
    return bin(arr, mid + 1, r, x);
  }
  return l;
}
int main() {
  long long n;
  long long m;
  cin >> n >> m;
  long long a[n];
  long long i;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  vector<long long> v;
  v.push_back(0);
  for (i = 0; i < n; i++) {
    v.push_back(a[i]);
  }
  v.push_back(m);
  long long sum = 0;
  vector<long long> v1;
  for (i = 1; i < n + 2; i++) {
    long long x = v[i] * (v[i] - 1) / 2 - ((v[i - 1]) * (v[i - 1] + 1)) / 2;
    if (sum + x > m) {
      break;
    } else {
      for (long long k = v[i - 1] + 1; k < v[i]; k++) {
        v1.push_back(k);
      }
      sum += x;
    }
  }
  for (long long j = v[i - 1] + 1; j <= m; j++) {
    if (sum + j <= m) {
      sum += j;
      v1.push_back(j);
    } else {
      break;
    }
  }
  cout << v1.size() << endl;
  for (i = 0; i < v1.size(); i++) {
    cout << v1[i] << " ";
  }
}
