#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, ans = 0;
  map<int, int> mp;
  cin >> n >> k;
  int a[n + 5];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    mp[a[i]] += 2;
  }
  for (i = 1; i <= 999999; i++) {
    if (k <= 0) break;
    if (mp[i] == 0 && k >= i) {
      k -= i;
      mp[i]++;
      ans++;
    }
  }
  cout << ans << "\n";
  for (i = 1; i <= 999999; i++) {
    if (mp[i] == 1) cout << i << " ";
  }
}
