#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, l, r, midn, cur, st, len, sum;
  cin >> n >> m;
  vector<long long> ans, a;
  a.push_back(0);
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
  }
  a.push_back(1e9 + 1);
  cur = m;
  sort(a.begin(), a.end());
  for (long long i = 0; i < a.size() - 1; i++) {
    l = a[i] + 1;
    r = a[i + 1] - 1;
    if (l > r) continue;
    if (cur < l) break;
    st = l;
    len = r - l + 1;
    l = 1;
    r = len;
    while (l < r) {
      midn = (l + r) / 2;
      sum = midn * (2 * st + midn - 1);
      if (sum < 2 * cur)
        l = midn + 1;
      else
        r = midn;
    }
    if (l * (2 * st + l - 1) > 2 * cur) --l;
    for (long long j = st; j <= st + l - 1; j++) {
      ans.push_back(j);
      cur -= j;
    }
  }
  cout << ans.size() << '\n';
  for (long long i : ans) cout << i << ' ';
  return 0;
}
