#include <bits/stdc++.h>
using namespace std;
long long arr[1000001];
int main() {
  long long n, m, x, k = 0, cnt = 0, j = 0, i;
  cin >> n >> m;
  map<long long, int> m1;
  for (i = 1; i <= n; i++) {
    cin >> x;
    m1[x] = 1;
  }
  for (i = 1; k < m; i++) {
    if (!m1[i]) {
      cnt++;
      k += i;
      arr[j++] = i;
    }
  }
  if (k > m) {
    cnt--;
    j--;
  }
  cout << cnt << endl;
  for (i = 0; i < j; i++) cout << arr[i] << " ";
  return 0;
}
