#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  n++;
  long long ara[n + 2];
  ara[0] = 0;
  for (long long i = 1; i < n; i++) cin >> ara[i];
  sort(ara, ara + n);
  long long sum = 0;
  vector<long long> v;
  for (int i = 1; i < n && sum < m; i++) {
    long long val = ara[i];
    val--;
    long long sum2 = ((val) * (val + 1)) / 2;
    long long sum1 = ((ara[i - 1]) * (ara[i - 1] + 1)) / 2;
    if (sum1 < sum2) {
      for (long long j = ara[i - 1] + 1; j <= val; j++) {
        sum += j;
        if (sum > m) break;
        sum1 += j;
        v.push_back(j);
        if (sum1 >= sum2) break;
      }
    }
  }
  long long last = ara[n - 1];
  last++;
  for (long long i = last; sum < m; i++) {
    sum += i;
    if (sum > m) break;
    v.push_back(i);
  }
  cout << v.size() << endl;
  for (auto it : v) {
    cout << it << " ";
  }
  cout << endl;
  return 0;
}
