#include <bits/stdc++.h>
using namespace std;
set<int> s;
vector<int> v;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    s.insert(x);
  }
  int sum = 0, cnt = 0;
  for (int i = 1; i < 200000; i++) {
    if (s.find(i) == s.end() && i + sum <= m) {
      sum += i;
      cnt++;
      v.push_back(i);
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
