#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
const long long MOD = 1e9 + 7;
long long n_bits(long long n) {
  long long x = __builtin_popcount(n);
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    int n, k, i, e, l = 0, sum = 0;
    map<int, int> m;
    cin >> n >> k;
    for (i = 1; i <= n; i++) {
      cin >> e;
      m[e] = 1;
    }
    for (i = 1; i < 1e9 && sum + i <= k; i++) {
      if (m[i] == 0) {
        sum += i;
        m[i] = 2;
        l++;
      }
    }
    cout << l << endl;
    for (auto x : m)
      if (x.second == 2) cout << x.first << " ";
  }
  return 0;
}
