#include <bits/stdc++.h>
using namespace std;
vector<long long> v, ans;
int main() {
  int n;
  long long m, x;
  scanf("%d %lld", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &x);
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  int p = 0;
  long long curr = 1;
  long long sum = 0;
  while (sum <= m) {
    while (p < v.size()) {
      if (v[p] == curr) {
        curr++;
        p++;
      } else
        break;
    }
    if (sum + curr > m) break;
    ans.push_back(curr);
    sum += curr;
    curr++;
  }
  int sz = ans.size();
  printf("%d\n", sz);
  for (int i = 0; i < ans.size(); i++) printf("%lld ", ans[i]);
  return 0;
}
