#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  set<long long> s;
  for (long long i = 0; i < n; i++) {
    long long b;
    cin >> b;
    s.insert(b);
  }
  long long m2 = m;
  long long c = 0;
  long long x = n;
  vector<long long> v;
  for (long long i = 1; i <= 1000000000; i++) {
    s.insert(i);
    if (s.size() != x && (m2 - i) >= 0) {
      m2 = m2 - i;
      v.push_back(i);
    }
    if ((m2 - i) <= 0) break;
    x = s.size();
  }
  long long ans = s.size() - n;
  cout << ans << "\n";
  for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
}
