#include <bits/stdc++.h>
using namespace std;
map<long long, int> mmp;
long long a[10000000];
int main() {
  long long n, m;
  while (cin >> n >> m) {
    long long t;
    for (int i = 0; i < n; i++) {
      scanf("%lld", &t);
      mmp[t] = i;
    }
    long long cos = 0;
    int cnt = 0;
    for (int i = 1;; i++) {
      if (!mmp.count(i)) {
        mmp[i] = n++;
        cos += i;
        a[cnt++] = i;
      }
      if (cos > m) {
        cos -= i;
        break;
      }
    }
    cout << cnt - 1 << endl;
    for (int i = 0; i < cnt - 1; i++) {
      printf("%d", a[i]);
      if (i != cnt - 2)
        printf(" ");
      else
        printf("\n");
    }
    mmp.clear();
  }
}
