#include <bits/stdc++.h>
using namespace std;
int a[100005], n, m;
vector<int> res;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int toy = 1;
  for (int i = 1; i <= n; i++) {
    for (; toy < a[i] && m - toy >= 0; toy++) {
      res.push_back(toy);
      m -= toy;
    }
    toy = a[i] + 1;
  }
  while (m - toy >= 0) {
    res.push_back(toy);
    m -= toy;
    toy++;
  }
  cout << res.size() << '\n';
  for (int i = 0; i < res.size(); i++) cout << res[i] << ' ';
  return 0;
}
