#include <bits/stdc++.h>
using namespace std;
int abso(int a, int b) {
  if (a < b)
    return b - a;
  else
    return a - b;
}
double power(double x, long long e) {
  double temp;
  if (e == 0) return 1;
  if (e % 2 == 0) {
    temp = power(x, e / 2);
    return temp * temp;
  } else {
    temp = power(x, e / 2);
    return temp * temp * x;
  }
}
bool cmp(pair<int, int> x, pair<int, int> y) {
  if (x.first == y.first) return x.second < y.second;
  return x.first < y.first;
}
bool cmp1(pair<int, int> x, pair<int, int> y) {
  if (x.second == y.second) return x.first < y.first;
  return x.second < y.second;
}
int main() {
  int n, m, cnt = 0;
  cin >> n >> m;
  int arr[n + 1];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  vector<int> vec;
  if (arr[0] > 1) {
    for (int j = 1; j < arr[0]; j++) {
      m -= j;
      if (m >= 0) {
        cnt++;
        vec.push_back(j);
        ;
      } else
        break;
    }
  }
  for (int i = 1; i < n && m > 0; i++) {
    for (int j = arr[i - 1] + 1; j < arr[i]; j++) {
      m -= j;
      if (m >= 0) {
        cnt++;
        vec.push_back(j);
        ;
      } else
        break;
    }
  }
  int j = arr[n - 1] + 1;
  while (m > 0) {
    m -= j;
    if (m >= 0) {
      cnt++;
      vec.push_back(j);
      ;
    } else
      break;
    j++;
  }
  cout << cnt << endl;
  for (int i = 0; i < vec.size(); i++) cout << vec[i] << " ";
  if (cnt) cout << endl;
  return 0;
}
