#include <bits/stdc++.h>
using namespace std;
long long GCDFast(long long a, long long b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int dx[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
long long GCD(long long b, long long a) {
  if (a == 0) return b;
  return GCD(a, b % a);
}
long long getLCM(long long a, long long b) {
  long long c = a / GCD(a, b);
  return b * c;
}
int size = 0;
long long b[1000005];
int main() {
  long long n, i, j, k, result = 0, temp, m;
  long long x, y, z, sum, test_case, length;
  long long flag, max = 0, min = 1e9, index = 0, l, r, total, c, q;
  string str;
  int type;
  while (cin >> n >> m) {
    map<int, int> mymap;
    for (i = 1; i <= n; i++) {
      cin >> x;
      mymap[x]++;
    }
    sum = 0;
    j = 0;
    for (i = 1;; i++) {
      if (!mymap[i]) {
        sum += i;
        if (sum <= m)
          b[j] = i;
        else
          break;
        j++;
      }
    }
    cout << j << "\n";
    for (i = 0; i < j; i++) cout << b[i] << " ";
    cout << "\n";
  }
  return 0;
}
