#include <bits/stdc++.h>
using namespace std;
long long sum(long long a, long long b) {
  return ((b * (b + 1)) - ((a - 1) * a)) / 2;
}
long long ind(long long a, long long val) {
  double D = sqrt((2 * a - 1) * (2 * a - 1) + 8 * val);
  return (long long)((1 - 2 * a + D) / 2);
}
int main() {
  ios_base::sync_with_stdio(0);
  int t, i, j;
  long long n, m;
  cin >> n >> m;
  long long arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  long long spent = 0;
  vector<long long> ans;
  if (arr[0] != 1) {
    if (sum(1, arr[0] - 1) <= m) {
      for (i = 1; i <= arr[0] - 1; i++) ans.push_back(i);
      spent += sum(1, arr[0] - 1);
    } else {
      long long num = ind(1, m);
      cout << num << "\n";
      for (i = 1; i <= num; i++) cout << i << " ";
      return 0;
    }
  }
  for (i = 0; i < n - 1; i++) {
    if (arr[i] == arr[i + 1]) continue;
    if (sum(arr[i] + 1, arr[i + 1] - 1) + spent <= m) {
      for (j = arr[i] + 1; j <= arr[i + 1] - 1; j++) ans.push_back(j);
      spent += sum(arr[i] + 1, arr[i + 1] - 1);
    } else {
      long long num = ind(arr[i] + 1, m - spent);
      for (j = 1; j <= num; j++) ans.push_back(arr[i] + j);
      break;
    }
  }
  if (i == n - 1) {
    long long num = ind(arr[n - 1] + 1, m - spent);
    for (j = 1; j <= num; j++) ans.push_back(arr[n - 1] + j);
  }
  cout << ans.size() << "\n";
  for (i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
