#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const long long int INF = 2e18;
const int mxn = 2e9 + 9;
const int mxd = 2e5 + 5;
const int mxa = 1e5 + 5;
int64_t gcd(int64_t a, int64_t b) {
  if (b == 0LL) return a;
  return gcd(b, a % b);
}
int64_t lcm(int64_t a, int64_t b) { return (a / gcd(a, b) * b); }
using namespace std;
void Run_Case() {
  int n;
  int64_t k;
  cin >> n >> k;
  vector<int> v(n);
  vector<int> ans;
  map<long long int, long long int> visited;
  for (int64_t i = 0; (int64_t)i < n; i++) {
    cin >> v[i];
    visited[v[i]] = 1;
  }
  int64_t sum = 0, i;
  for (i = 1; i <= mxd; i++) {
    if (visited[i] == 0) {
      visited[i] = 1;
      ans.push_back(i);
      sum += i;
    }
    if (sum > k) break;
  }
  if (((long long int)(ans).size()) == 1) {
    cout << "0" << '\n';
    return;
  }
  if (sum - ans.back() == k)
    ans.pop_back();
  else {
    int a = ans.back();
    sum -= a;
    ans.pop_back();
    int b = ans.back();
    sum -= b;
    ans.pop_back();
    if ((sum + a) <= k)
      ans.push_back(a);
    else
      ans.push_back(b);
  }
  cout << ((long long int)(ans).size()) << '\n';
  for (auto aa : ans) cout << aa << " ";
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  T = 1;
  while (T--) {
    Run_Case();
  }
  return 0;
}
