#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[n], i, curr = 1, res = 0, j, count = 0;
  vector<long long> arr;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  j = 1;
  for (i = 0; i < n; i++) {
    while (res < k && j < a[i] && res + j <= k) {
      arr.push_back(j);
      res += j;
      count++;
      j++;
    }
    if (res >= k) {
      break;
    }
    j = a[i] + 1;
  }
  j = a[n - 1] + 1;
  while (res < k && res + j <= k) {
    arr.push_back(j);
    res += j;
    count++;
    j++;
  }
  cout << count << "\n";
  for (i = 0; i < arr.size(); i++) {
    cout << arr[i] << " ";
  }
}
