#include <bits/stdc++.h>
int n, m, x, b[1000005], k = 1, s = 0;
using namespace std;
map<int, int> a;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    a[x] = 1;
  }
  n = 1000000000;
  for (int i = 1; i <= n; i++) {
    if (a[i] != 1) {
      if (s + i <= m) {
        s += i;
        b[k++] = i;
      } else
        break;
    }
  }
  cout << k - 1 << endl;
  n = k - 1;
  for (int i = 1; i < k; i++) cout << b[i] << " ";
  return 0;
}
